rcu: Convert rcu_check_gp_kthread_starvation() to GP sequence number
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 27 Apr 2018 20:32:28 +0000 (13:32 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 12 Jul 2018 21:27:48 +0000 (14:27 -0700)
This commit switches rcu_check_gp_kthread_starvation() from printing
->gpnum and ->completed to printing ->gp_seq upon detecting a starving
RCU grace-period kthread during an RCU CPU stall warning.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c

index 547112bec26a0a995eee51df02ce9f41fa0e5364..002f853572261de27ead2087756cfabcc5205313 100644 (file)
@@ -1276,9 +1276,9 @@ static void rcu_check_gp_kthread_starvation(struct rcu_state *rsp)
        j = jiffies;
        gpa = READ_ONCE(rsp->gp_activity);
        if (j - gpa > 2 * HZ) {
-               pr_err("%s kthread starved for %ld jiffies! g%lu c%lu f%#x %s(%d) ->state=%#lx ->cpu=%d\n",
+               pr_err("%s kthread starved for %ld jiffies! g%ld f%#x %s(%d) ->state=%#lx ->cpu=%d\n",
                       rsp->name, j - gpa,
-                      rsp->gpnum, rsp->completed,
+                      (long)rcu_seq_current(&rsp->gp_seq),
                       rsp->gp_flags,
                       gp_state_getname(rsp->gp_state), rsp->gp_state,
                       rsp->gp_kthread ? rsp->gp_kthread->state : ~0,