]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rcu: Note quiescent state when CPU goes offline
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 12 Nov 2014 17:57:51 +0000 (09:57 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 6 Jan 2015 19:02:51 +0000 (11:02 -0800)
The rcu_cleanup_dead_cpu() function (called after a CPU has gone
completely offline) has not reported a quiescent state because there
was probably at least one synchronize_rcu() between the time the CPU
went offline and the CPU_DEAD notifier, and this would have detected
the CPU's offline state via quiescent-state forcing.  However, the plan
is for CPUs to take themselves offline, at which point it makes sense
for them to report their own quiescent state.  This commit makes this
change in preparation for the new CPU-hotplug setup.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c

index 5a0a4c969d3832e724b178b82586cbe2f558682b..24d3c67f7be77f81daf757a1e0fc4486e6158b22 100644 (file)
@@ -2297,7 +2297,7 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
        rnp->qsmaskinit &= ~rdp->grpmask;
        if (rnp->qsmaskinit == 0 && !rcu_preempt_has_tasks(rnp))
                rcu_cleanup_dead_rnp(rnp);
-       raw_spin_unlock_irqrestore(&rnp->lock, flags);
+       rcu_report_qs_rnp(rdp->grpmask, rsp, rnp, flags); /* Rlses rnp->lock. */
        WARN_ONCE(rdp->qlen != 0 || rdp->nxtlist != NULL,
                  "rcu_cleanup_dead_cpu: Callbacks on offline CPU %d: qlen=%lu, nxtlist=%p\n",
                  cpu, rdp->qlen, rdp->nxtlist);