Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1467718

[PATCH tip/core/rcu 6/6] rcu: Use RCU's online-CPU state for expedited IPI retry

From "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH tip/core/rcu 6/6] rcu: Use RCU's online-CPU state for expedited IPI retry
Date 2016-08-22 17:30 +0200
Message-ID <s8ZkK-81a-23@gated-at.bofh.it> (permalink)
References <s8ZkJ-81a-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 kernel/rcu/tree_exp.h | 11 +++++------
 1 file 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:
 				mask_ofl_ipi &= ~mask;
 				continue;
 			}
-			/* Failed, raced with offline. */
+			/* Failed, raced with CPU hotplug operation. */
 			raw_spin_lock_irqsave_rcu_node(rnp, flags);
-			if (cpu_online(cpu) &&
+			if ((rnp->qsmaskinitnext & mask) &&
 			    (rnp->expmask & mask)) {
+				/* Online, so delay for a bit and try again. */
 				raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
 				schedule_timeout_uninterruptible(1);
-				if (cpu_online(cpu) &&
-				    (rnp->expmask & mask))
-					goto retry_ipi;
-				raw_spin_lock_irqsave_rcu_node(rnp, flags);
+				goto retry_ipi;
 			}
+			/* CPU really is offline, so we can ignore it. */
 			if (!(rnp->expmask & mask))
 				mask_ofl_ipi &= ~mask;
 			raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
-- 
2.5.2

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH tip/core/rcu 0/2] Expedited grace-period updates "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:30 +0200
  [PATCH tip/core/rcu 3/6] rcu: Stop disabling expedited RCU CPU stall warnings "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:30 +0200
  [PATCH tip/core/rcu 4/6] rcu: Make expedited RCU CPU stall warnings respond to controls "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:30 +0200
  [PATCH tip/core/rcu 2/6] rcu: Drive expedited grace periods from workqueue "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:30 +0200
  [PATCH tip/core/rcu 6/6] rcu: Use RCU's online-CPU state for expedited IPI retry "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:30 +0200

csiph-web