aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-04-07 16:34:07 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-04-29 11:45:24 -0400
commitbecb41bfe0544f1f7f494f48d6f68cbdb2e1ed0e (patch)
treec71041b70966e689ccc7e667ce94e57f7469f047 /kernel/rcu
parent5057f55e543b7859cfd26bc281291795eac93f8a (diff)
rcu: Make large and small sysidle systems use same state machine
Currently, small systems move back into RCU_SYSIDLE_NOT from RCU_SYSIDLE_SHORT and large systems do not. This works because moving aggressively to RCU_SYSIDLE_NOT affects only performance, not correctness, and on small systems, the performance impact should be negligible. That said, this difference does make RCU a bit more complex, and RCU does not seem to be suffering from any lack of complexity. This commit therefore adjusts small-system operation to match that of large systems, so that the state never moves back to RCU_SYSIDLE_NOT from RCU_SYSIDLE_SHORT. Reported-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcu')
-rw-r--r--kernel/rcu/tree_plugin.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 045c6d04ed3f..f7593c2536b0 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -2659,7 +2659,8 @@ static void rcu_sysidle(unsigned long j)
2659static void rcu_sysidle_cancel(void) 2659static void rcu_sysidle_cancel(void)
2660{ 2660{
2661 smp_mb(); 2661 smp_mb();
2662 ACCESS_ONCE(full_sysidle_state) = RCU_SYSIDLE_NOT; 2662 if (full_sysidle_state > RCU_SYSIDLE_SHORT)
2663 ACCESS_ONCE(full_sysidle_state) = RCU_SYSIDLE_NOT;
2663} 2664}
2664 2665
2665/* 2666/*