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


Groups > linux.kernel > #1423546 > unrolled thread

[PATCH tip/core/rcu 3/8] waketorture: Don't kick unless grace period or request

Started by"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
First post2016-06-16 00:30 +0200
Last post2016-06-16 00:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH tip/core/rcu 3/8] waketorture: Don't kick unless grace period or request "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-06-16 00:30 +0200

#1423546 — [PATCH tip/core/rcu 3/8] waketorture: Don't kick unless grace period or request

From"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date2016-06-16 00:30 +0200
Subject[PATCH tip/core/rcu 3/8] waketorture: Don't kick unless grace period or request
Message-ID<rKrtU-8sD-11@gated-at.bofh.it>
The current code can result in spurious kicks when there are no grace
periods in progress and no grace-period-related requests.  This is
sort of OK for a diagnostic aid, but the resulting ftrace-dump messages
in dmesg are annoying.  This commit therefore avoids spurious kicks
in the common case.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/rcu/tree.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index f433959e9322..88d3f9590322 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1306,7 +1306,8 @@ static void rcu_stall_kick_kthreads(struct rcu_state *rsp)
 	if (!rcu_kick_kthreads)
 		return;
 	j = READ_ONCE(rsp->jiffies_kick_kthreads);
-	if (time_after(jiffies, j) && rsp->gp_kthread) {
+	if (time_after(jiffies, j) && rsp->gp_kthread &&
+	    (rcu_gp_in_progress(rsp) || READ_ONCE(rsp->gp_flags))) {
 		WARN_ONCE(1, "Kicking %s grace-period kthread\n", rsp->name);
 		rcu_ftrace_dump(DUMP_ALL);
 		wake_up_process(rsp->gp_kthread);
-- 
2.5.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web