From af100cdcb0df5ce00366d97c6803a8b2d3546ad0 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sun, 14 Aug 2011 15:56:54 -0700 Subject: [PATCH] --- yaml --- r: 268979 b: refs/heads/master c: 06ae115a1d551cd952d80df06eaf8b5153351875 h: refs/heads/master i: 268977: 34b04a09550028e4dbd3424b291802dad3d06749 268975: 30180054c61b5164dd5b523c8c0c2a3acebb4ece v: v3 --- [refs] | 2 +- trunk/kernel/rcutree.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index e1ab7c83c5ac..864a43efa9b4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9bc8b5586f94be6391458074ecbba8827ba8ba9d +refs/heads/master: 06ae115a1d551cd952d80df06eaf8b5153351875 diff --git a/trunk/kernel/rcutree.c b/trunk/kernel/rcutree.c index ade788320dd6..c95fa89ffef9 100644 --- a/trunk/kernel/rcutree.c +++ b/trunk/kernel/rcutree.c @@ -1911,8 +1911,6 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptible) /* Set up local state, ensuring consistent view of global state. */ raw_spin_lock_irqsave(&rnp->lock, flags); - rdp->passed_quiesce = 0; /* We could be racing with new GP, */ - rdp->qs_pending = 1; /* so set up to respond to current GP. */ rdp->beenonline = 1; /* We have now been online. */ rdp->preemptible = preemptible; rdp->qlen_last_fqs_check = 0; @@ -1937,8 +1935,15 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptible) rnp->qsmaskinit |= mask; mask = rnp->grpmask; if (rnp == rdp->mynode) { - rdp->gpnum = rnp->completed; /* if GP in progress... */ + /* + * If there is a grace period in progress, we will + * set up to wait for it next time we run the + * RCU core code. + */ + rdp->gpnum = rnp->completed; rdp->completed = rnp->completed; + rdp->passed_quiesce = 0; + rdp->qs_pending = 0; rdp->passed_quiesce_gpnum = rnp->gpnum - 1; trace_rcu_grace_period(rsp->name, rdp->gpnum, "cpuonl"); }