From: Neeraj Upadhyay <neeraju@codeaurora.org>
To: paulmck@kernel.org
Cc: josh@joshtriplett.org, rostedt@goodmis.org,
mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com,
joel@joelfernandes.org, rcu@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rcu: Correct cpu offline trace in rcutree_dying_cpu
Date: Wed, 13 Jan 2021 10:41:20 +0530 [thread overview]
Message-ID: <c1dd3362-7087-7141-4a4a-28d67db1924e@codeaurora.org> (raw)
In-Reply-To: <20210112173116.GG2743@paulmck-ThinkPad-P72>
On 1/12/2021 11:01 PM, Paul E. McKenney wrote:
> On Mon, Jan 11, 2021 at 05:15:58PM +0530, Neeraj Upadhyay wrote:
>> Correctly trace whether the outgoing cpu blocks current gp in
>> rcutree_dying_cpu().
>>
>> Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
>
> Good catch, queued, thank you! Please see below for my usual
> wordsmithing, and please lat me know if I messed something up.
>
> Thanx, Paul
>
Thanks Paul, looks good!
Thanks
Neeraj
> ------------------------------------------------------------------------
>
> commit ab6e7609e7590e1bb220ef6b0822a823dde46f6c
> Author: Neeraj Upadhyay <neeraju@codeaurora.org>
> Date: Mon Jan 11 17:15:58 2021 +0530
>
> rcu: Fix CPU-offline trace in rcutree_dying_cpu
>
> 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>
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index cc6b6fc..63c6dba 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2387,7 +2387,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;
> }
>
>
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
member of the Code Aurora Forum, hosted by The Linux Foundation
prev parent reply other threads:[~2021-01-13 5:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 11:45 [PATCH] rcu: Correct cpu offline trace in rcutree_dying_cpu Neeraj Upadhyay
2021-01-12 17:31 ` Paul E. McKenney
2021-01-13 5:11 ` Neeraj Upadhyay [this message]
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=c1dd3362-7087-7141-4a4a-28d67db1924e@codeaurora.org \
--to=neeraju@codeaurora.org \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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).