aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2009-01-04 23:30:06 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-05 04:10:28 -0500
commitc12172c0251761c54260376eb29a5f6547495580 (patch)
treeb773010a88be3beeb4dfaf2658b76b40b448e98a /kernel
parent52942b6b16c6ebb25f4dd4df0208d840ba0cbc5c (diff)
rcu: fix rcutree grace-period-latency bug on small systems
Impact: fix delays during bootup Kudos to Andi Kleen for finding a grace-period-latency problem! The problem was that the special-case code for small machines never updated the ->signaled field to indicate that grace-period initialization had completed, which prevented force_quiescent_state() from ever expediting grace periods. This problem resulted in grace periods extending for more than 20 seconds. Not subtle. I introduced this bug during my inspection process when I fixed a race between grace-period initialization and force_quiescent_state() execution. The following patch properly updates the ->signaled field for the "small"-system case (no more than 32 CPUs for 32-bit kernels and no more than 64 CPUs for 64-bit kernels). Reported-by: Andi Kleen <andi@firstfloor.org> Tested-by: Andi Kleen <andi@firstfloor.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcutree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index a342b032112c..88d921c5c449 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -572,6 +572,7 @@ rcu_start_gp(struct rcu_state *rsp, unsigned long flags)
572 /* Special-case the common single-level case. */ 572 /* Special-case the common single-level case. */
573 if (NUM_RCU_NODES == 1) { 573 if (NUM_RCU_NODES == 1) {
574 rnp->qsmask = rnp->qsmaskinit; 574 rnp->qsmask = rnp->qsmaskinit;
575 rsp->signaled = RCU_SIGNAL_INIT; /* force_quiescent_state OK. */
575 spin_unlock_irqrestore(&rnp->lock, flags); 576 spin_unlock_irqrestore(&rnp->lock, flags);
576 return; 577 return;
577 } 578 }