waketorture: Don't kick unless grace period or request
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 23 Mar 2016 17:43:23 +0000 (10:43 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 26 Aug 2016 18:45:59 +0000 (11:45 -0700)
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

index 7e2e03879c2e55bf259f257868b8b457d5353b07..3a8eec3ba1bdfd184894b38c418f2c50fcae0082 100644 (file)
@@ -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);
This page took 0.027333 seconds and 5 git commands to generate.