linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: paulmck@kernel.org
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
	mingo@kernel.org, jiangshanlai@gmail.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,
	fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
	Neeraj Upadhyay <neeraju@codeaurora.org>,
	"Paul E . McKenney" <paulmck@kernel.org>
Subject: [PATCH tip/core/rcu 02/10] rcu: Fix CPU-offline trace in rcutree_dying_cpu
Date: Wed,  3 Mar 2021 16:00:11 -0800	[thread overview]
Message-ID: <20210304000019.22459-2-paulmck@kernel.org> (raw)
In-Reply-To: <20210303235958.GA22373@paulmck-ThinkPad-P72>

From: Neeraj Upadhyay <neeraju@codeaurora.org>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index cdf091f..e62c2de 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -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;
 }
 
-- 
2.9.5


  parent reply	other threads:[~2021-03-04  0:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 23:59 [PATCH tip/core/rcu 0/10] Miscellaneous fixes for v5.13 Paul E. McKenney
2021-03-04  0:00 ` [PATCH tip/core/rcu 01/10] rcu: Remove superfluous rdp fetch paulmck
2021-03-04  0:00 ` paulmck [this message]
2021-03-04  0:00 ` [PATCH tip/core/rcu 03/10] rcu: Remove spurious instrumentation_end() in rcu_nmi_enter() paulmck
2021-03-04  0:00 ` [PATCH tip/core/rcu 04/10] rculist: Replace reference to atomic_ops.rst paulmck
2021-03-04  0:00 ` [PATCH tip/core/rcu 05/10] rcu: Fix kfree_rcu() docbook errors paulmck
2021-03-04  0:00 ` [PATCH tip/core/rcu 06/10] softirq: Don't try waking ksoftirqd before it has been spawned paulmck
2021-03-12 11:36   ` Frederic Weisbecker
2021-03-15 23:11     ` Paul E. McKenney
2021-03-04  0:00 ` [PATCH tip/core/rcu 07/10] rcu: Prevent dyntick-idle until ksoftirqd " paulmck
2021-03-11 23:23   ` Frederic Weisbecker
2021-03-11 23:34     ` Paul E. McKenney
2021-03-04  0:00 ` [PATCH tip/core/rcu 08/10] docs: Correctly spell Stephen Hemminger's name paulmck
2021-03-04  0:00 ` [PATCH tip/core/rcu 09/10] rcu: Add explicit barrier() to __rcu_read_unlock() paulmck
2021-03-04  0:00 ` [PATCH tip/core/rcu 10/10] rcu/tree: Add a trace event for RCU CPU stall warnings paulmck

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=20210304000019.22459-2-paulmck@kernel.org \
    --to=paulmck@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=neeraju@codeaurora.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rcu@vger.kernel.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).