rcu: Fix CPU-offline trace in rcutree_dying_cpu
authorNeeraj Upadhyay <neeraju@codeaurora.org>
Mon, 11 Jan 2021 11:45:58 +0000 (17:15 +0530)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 8 Mar 2021 22:17:35 +0000 (14:17 -0800)
The condition in the trace_rcu_grace_period() in rcutree_dying_cpu() is
backwards, so that it uses the string "cpuofl" when the offline CPU is
blocking the current grace period and "cpuofl-bgp" otherwise.  Given that
the "-bgp" stands for "blocking grace period", this is at best misleading.
This commit therefore switches these strings in order to correctly trace
whether the outgoing cpu blocks the current grace period.

Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c

index cdf091f351817c1c115d88bdf765646cf0d350ae..e62c2defae987bbe4b6bcfa65dae1e33b250df95 100644 (file)
@@ -2413,7 +2413,7 @@ int rcutree_dying_cpu(unsigned int cpu)
 
        blkd = !!(rnp->qsmask & rdp->grpmask);
        trace_rcu_grace_period(rcu_state.name, READ_ONCE(rnp->gp_seq),
-                              blkd ? TPS("cpuofl") : TPS("cpuofl-bgp"));
+                              blkd ? TPS("cpuofl-bgp") : TPS("cpuofl"));
        return 0;
 }