diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-06-30 15:16:11 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-08-22 12:30:42 -0400 |
commit | 385c859f678e8ee6b0b122086f34e72a0e861cef (patch) | |
tree | dcab84e913044084d0ba1ec4a58385da288deb16 /kernel/rcu | |
parent | 98834b83785e1388fa8672cf4f8de09974d15e86 (diff) |
rcu: Use RCU's online-CPU state for expedited IPI retry
This commit improves the accuracy of the interaction between CPU hotplug
operations and RCU's expedited grace periods by using RCU's online-CPU
state to determine when failed IPIs should be retried.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/tree_exp.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h index 3bc4b3dda801..24343eb87b58 100644 --- a/kernel/rcu/tree_exp.h +++ b/kernel/rcu/tree_exp.h | |||
@@ -385,17 +385,16 @@ retry_ipi: | |||
385 | mask_ofl_ipi &= ~mask; | 385 | mask_ofl_ipi &= ~mask; |
386 | continue; | 386 | continue; |
387 | } | 387 | } |
388 | /* Failed, raced with offline. */ | 388 | /* Failed, raced with CPU hotplug operation. */ |
389 | raw_spin_lock_irqsave_rcu_node(rnp, flags); | 389 | raw_spin_lock_irqsave_rcu_node(rnp, flags); |
390 | if (cpu_online(cpu) && | 390 | if ((rnp->qsmaskinitnext & mask) && |
391 | (rnp->expmask & mask)) { | 391 | (rnp->expmask & mask)) { |
392 | /* Online, so delay for a bit and try again. */ | ||
392 | raw_spin_unlock_irqrestore_rcu_node(rnp, flags); | 393 | raw_spin_unlock_irqrestore_rcu_node(rnp, flags); |
393 | schedule_timeout_uninterruptible(1); | 394 | schedule_timeout_uninterruptible(1); |
394 | if (cpu_online(cpu) && | 395 | goto retry_ipi; |
395 | (rnp->expmask & mask)) | ||
396 | goto retry_ipi; | ||
397 | raw_spin_lock_irqsave_rcu_node(rnp, flags); | ||
398 | } | 396 | } |
397 | /* CPU really is offline, so we can ignore it. */ | ||
399 | if (!(rnp->expmask & mask)) | 398 | if (!(rnp->expmask & mask)) |
400 | mask_ofl_ipi &= ~mask; | 399 | mask_ofl_ipi &= ~mask; |
401 | raw_spin_unlock_irqrestore_rcu_node(rnp, flags); | 400 | raw_spin_unlock_irqrestore_rcu_node(rnp, flags); |