From 6b0fb5b2a7a157c04d8ab6ad71b092034d0048bf Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Wed, 11 Feb 2015 16:19:26 -0600 Subject: [PATCH 102/114] cpuidle: skip synchronize_rcu() on single CPU systems synchronize_rcu() is pretty expensive, and on single CPU systems we don't need it in this specific case, so skip it. Signed-off-by: Arjan van de Ven Signed-off-by: Miguel Bernal Marin --- drivers/cpuidle/cpuidle.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 62810ff3b00f..f1d110411098 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -324,8 +324,11 @@ void cpuidle_uninstall_idle_handler(void) /* * Make sure external observers (such as the scheduler) * are done looking at pointed idle states. + * This is only relevant if there is more than one cpu, + * if there is only one CPU, that is us... and we're + * coherent to ourselves. */ - synchronize_rcu(); + } /** -- 2.11.1