summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt_guest/0102-cpuidle-skip-synchronize_rcu-on-single-CPU-systems.patch
blob: 1de2a6bf469187b00fcbcc7e3d52f4e0b2052cf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 6b0fb5b2a7a157c04d8ab6ad71b092034d0048bf Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
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 <arjan@linux.intel.com>
Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 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