lkml.org 
[lkml]   [2018]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH tip/core/rcu 40/40] rcu: Identify grace period is in progress as we advance up the tree
Date
From: "Joel Fernandes (Google)" <joel@joelfernandes.org>

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>
---
kernel/rcu/tree.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 0dac8c716c48..73298a27620f 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,
goto unlock_out;
}
rnp->gp_seq_needed = gp_seq_req;
- if (rcu_seq_state(rcu_seq_current(&rnp_start->gp_seq))) {
+ if (rcu_seq_state(rcu_seq_current(&rnp->gp_seq))) {
/*
- * We just marked the leaf, and a grace period
- * is in progress, which means that rcu_gp_cleanup()
- * will see the marking. Bail to reduce contention.
+ * We just marked the leaf or internal node, and a
+ * grace period is in progress, which means that
+ * rcu_gp_cleanup() will see the marking. Bail to
+ * reduce contention.
*/
trace_rcu_this_gp(rnp_start, rdp, gp_seq_req,
TPS("Startedleaf"));
--
2.17.1
\
 
 \ /
  Last update: 2018-06-26 02:12    [W:0.244 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site