From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com,
bobby.prani@gmail.com,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 7/7] rcu: Don't kick unless grace period or request
Date: Mon, 14 Nov 2016 08:57:13 -0800 [thread overview]
Message-ID: <1479142633-15315-7-git-send-email-paulmck@linux.vnet.ibm.com> (raw)
In-Reply-To: <20161114165648.GA15216@linux.vnet.ibm.com>
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 865af187498e..96c52e43f7ca 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1304,7 +1304,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
next prev parent reply other threads:[~2016-11-14 16:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 16:56 [PATCH tip/core/rcu 0/7] Miscellaneous fixes for 4.10 Paul E. McKenney
2016-11-14 16:57 ` [PATCH tip/core/rcu 1/7] rcu: Tighten up __call_rcu() rcu_head alignment check Paul E. McKenney
2016-11-14 16:57 ` [PATCH tip/core/rcu 2/7] rcu: Remove obsolete rcu_check_callbacks() header comment Paul E. McKenney
2016-11-14 16:57 ` [PATCH tip/core/rcu 3/7] rcu: Remove obsolete comment from __call_rcu() Paul E. McKenney
2016-11-14 16:57 ` [PATCH tip/core/rcu 4/7] rcu: RCU_TRACE enables event tracing as well as debugfs Paul E. McKenney
2016-11-14 16:57 ` [PATCH tip/core/rcu 5/7] torture: Trace long read-side delays Paul E. McKenney
2016-11-14 17:21 ` Josh Triplett
2016-11-14 18:44 ` Paul E. McKenney
2016-11-14 18:54 ` Josh Triplett
2016-11-14 16:57 ` [PATCH tip/core/rcu 6/7] rcu: Make expedited grace periods recheck dyntick idle state Paul E. McKenney
2016-11-14 17:25 ` Josh Triplett
2016-11-14 17:37 ` Peter Zijlstra
2016-11-14 18:12 ` Paul E. McKenney
2016-11-15 8:16 ` Peter Zijlstra
2016-11-15 14:36 ` Paul E. McKenney
2016-11-14 16:57 ` Paul E. McKenney [this message]
2016-11-14 17:26 ` [PATCH tip/core/rcu 0/7] Miscellaneous fixes for 4.10 Josh Triplett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479142633-15315-7-git-send-email-paulmck@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=bobby.prani@gmail.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=dvhart@linux.intel.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).