aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorJoel Fernandes (Google) <joel@joelfernandes.org>2018-05-23 02:38:15 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2018-07-12 18:38:57 -0400
commit226ca5e76692e2c82c17e8e8eedab22043f6ffee (patch)
treeaefe152e76957f336a09926fac4821c0ca80c992 /kernel/rcu/tree.c
parentdf2bf8f7f776cef57e6b27690c7b78c86f259515 (diff)
rcu: Identify grace period is in progress as we advance up the tree
There's no need to keep checking the same starting node for whether a grace period is in progress as we advance up the funnel lock loop. Its sufficient if we just checked it in the start, and then subsequently checked the internal nodes as we advanced up the combining tree. This also makes sense because the grace-period updates propogate from the root to the leaf, so there's a chance we may find a grace period has started as we advance up, lets check for the same. Reported-by: Paul McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 1af58f4b8a25..a6863b813f0c 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1598,11 +1598,12 @@ static bool rcu_start_this_gp(struct rcu_node *rnp_start, struct rcu_data *rdp,
1598 goto unlock_out; 1598 goto unlock_out;
1599 } 1599 }
1600 rnp->gp_seq_needed = gp_seq_req; 1600 rnp->gp_seq_needed = gp_seq_req;
1601 if (rcu_seq_state(rcu_seq_current(&rnp_start->gp_seq))) { 1601 if (rcu_seq_state(rcu_seq_current(&rnp->gp_seq))) {
1602 /* 1602 /*
1603 * We just marked the leaf, and a grace period 1603 * We just marked the leaf or internal node, and a
1604 * is in progress, which means that rcu_gp_cleanup() 1604 * grace period is in progress, which means that
1605 * will see the marking. Bail to reduce contention. 1605 * rcu_gp_cleanup() will see the marking. Bail to
1606 * reduce contention.
1606 */ 1607 */
1607 trace_rcu_this_gp(rnp_start, rdp, gp_seq_req, 1608 trace_rcu_this_gp(rnp_start, rdp, gp_seq_req,
1608 TPS("Startedleaf")); 1609 TPS("Startedleaf"));