All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rcu: Skip additional checks if rcu_cpu_stall_suppress is set
@ 2017-08-08 17:20 Neeraj Upadhyay
  2017-08-08 18:02 ` Paul E. McKenney
  0 siblings, 1 reply; 4+ messages in thread
From: Neeraj Upadhyay @ 2017-08-08 17:20 UTC (permalink / raw)
  To: paulmck, josh, rostedt, mathieu.desnoyers, jiangshanlai
  Cc: linux-kernel, Neeraj Upadhyay

If rcu_kick_kthreads is set, and gp is in progress, check_cpu_stall()
does checks to figure out whether jiffies is past rsp->jiffies_stall,
doing ordered accesses to avoid any false positives for new grace
period initialization after a sufficiently large idle period. This
extra processing can be skipped if rcu_cpu_stall_suppress is set.

Fixes: 8c7c4829a81c ("rcu: Awaken grace-period kthread if too long since FQS")
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
---
 kernel/rcu/tree.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 51d4c3a..91b7552 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1562,10 +1562,13 @@ static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)
 	unsigned long js;
 	struct rcu_node *rnp;
 
-	if ((rcu_cpu_stall_suppress && !rcu_kick_kthreads) ||
-	    !rcu_gp_in_progress(rsp))
+	if (!rcu_gp_in_progress(rsp))
 		return;
 	rcu_stall_kick_kthreads(rsp);
+
+	if (rcu_cpu_stall_suppress)
+		return;
+
 	j = jiffies;
 
 	/*
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
member of the Code Aurora Forum, hosted by The Linux Foundation

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-08 21:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-08 17:20 [PATCH] rcu: Skip additional checks if rcu_cpu_stall_suppress is set Neeraj Upadhyay
2017-08-08 18:02 ` Paul E. McKenney
2017-08-08 18:57   ` Neeraj Upadhyay
2017-08-08 21:56     ` Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.