diff options
| author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-10-31 16:48:41 -0400 |
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-01-06 14:02:45 -0500 |
| commit | a8f4cbadfb5c5f7f5d9eef70821276a4e2e9289d (patch) | |
| tree | 78725990111ebe677c9b6df8101f80a202011cdd /kernel/rcu | |
| parent | d19fb8d1f3f66cc342d30aa48f090c70afb753ed (diff) | |
rcu: Shorten irq-disable region in rcu_cleanup_dead_cpu()
Now that we are not migrating callbacks, there is no need to hold the
->orphan_lock across the the ->qsmaskinit bit-clearing process.
This commit therefore releases ->orphan_lock immediately after adopting
the orphaned RCU callbacks.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu')
| -rw-r--r-- | kernel/rcu/tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 84f16cf05991..990b406faf4e 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
| @@ -2289,14 +2289,14 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp) | |||
| 2289 | /* Orphan the dead CPU's callbacks, and adopt them if appropriate. */ | 2289 | /* Orphan the dead CPU's callbacks, and adopt them if appropriate. */ |
| 2290 | rcu_send_cbs_to_orphanage(cpu, rsp, rnp, rdp); | 2290 | rcu_send_cbs_to_orphanage(cpu, rsp, rnp, rdp); |
| 2291 | rcu_adopt_orphan_cbs(rsp, flags); | 2291 | rcu_adopt_orphan_cbs(rsp, flags); |
| 2292 | raw_spin_unlock_irqrestore(&rsp->orphan_lock, flags); | ||
| 2292 | 2293 | ||
| 2293 | /* Remove outgoing CPU from mask in the leaf rcu_node structure. */ | 2294 | /* Remove outgoing CPU from mask in the leaf rcu_node structure. */ |
| 2294 | raw_spin_lock(&rnp->lock); /* irqs already disabled. */ | 2295 | raw_spin_lock_irqsave(&rnp->lock, flags); |
| 2295 | smp_mb__after_unlock_lock(); /* Enforce GP memory-order guarantee. */ | 2296 | smp_mb__after_unlock_lock(); /* Enforce GP memory-order guarantee. */ |
| 2296 | rnp->qsmaskinit &= ~rdp->grpmask; | 2297 | rnp->qsmaskinit &= ~rdp->grpmask; |
| 2297 | if (rnp->qsmaskinit == 0 && !rcu_preempt_has_tasks(rnp)) | 2298 | if (rnp->qsmaskinit == 0 && !rcu_preempt_has_tasks(rnp)) |
| 2298 | rcu_cleanup_dead_rnp(rnp); | 2299 | rcu_cleanup_dead_rnp(rnp); |
| 2299 | raw_spin_unlock(&rsp->orphan_lock); /* irqs remain disabled. */ | ||
| 2300 | raw_spin_unlock_irqrestore(&rnp->lock, flags); | 2300 | raw_spin_unlock_irqrestore(&rnp->lock, flags); |
| 2301 | WARN_ONCE(rdp->qlen != 0 || rdp->nxtlist != NULL, | 2301 | WARN_ONCE(rdp->qlen != 0 || rdp->nxtlist != NULL, |
| 2302 | "rcu_cleanup_dead_cpu: Callbacks on offline CPU %d: qlen=%lu, nxtlist=%p\n", | 2302 | "rcu_cleanup_dead_cpu: Callbacks on offline CPU %d: qlen=%lu, nxtlist=%p\n", |
