diff options
| author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-03-23 13:43:23 -0400 | 
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-11-14 13:46:31 -0500 | 
| commit | aa3e0bf1aa76579c6c51a2c1116a630aa716379d (patch) | |
| tree | d386fccec6234fdc02a9ee7da8c8513ce5203cc4 /kernel/rcu/tree.c | |
| parent | 0742ac3e2f9f4b8a3a394a270d8685078837662b (diff) | |
rcu: Don't kick unless grace period or request
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>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcu/tree.c')
| -rw-r--r-- | kernel/rcu/tree.c | 3 | 
1 files changed, 2 insertions, 1 deletions
| 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) | |||
| 1304 | if (!rcu_kick_kthreads) | 1304 | if (!rcu_kick_kthreads) | 
| 1305 | return; | 1305 | return; | 
| 1306 | j = READ_ONCE(rsp->jiffies_kick_kthreads); | 1306 | j = READ_ONCE(rsp->jiffies_kick_kthreads); | 
| 1307 | if (time_after(jiffies, j) && rsp->gp_kthread) { | 1307 | if (time_after(jiffies, j) && rsp->gp_kthread && | 
| 1308 | (rcu_gp_in_progress(rsp) || READ_ONCE(rsp->gp_flags))) { | ||
| 1308 | WARN_ONCE(1, "Kicking %s grace-period kthread\n", rsp->name); | 1309 | WARN_ONCE(1, "Kicking %s grace-period kthread\n", rsp->name); | 
| 1309 | rcu_ftrace_dump(DUMP_ALL); | 1310 | rcu_ftrace_dump(DUMP_ALL); | 
| 1310 | wake_up_process(rsp->gp_kthread); | 1311 | wake_up_process(rsp->gp_kthread); | 
