From: Mukesh Ojha <quic_mojha@quicinc.com>
To: Zqiang <qiang1.zhang@intel.com>, <paulmck@kernel.org>,
<frederic@kernel.org>
Cc: <rcu@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rcu: Fix incorrect judgment condition in show_rcu_nocb_state()
Date: Wed, 25 May 2022 17:26:52 +0530 [thread overview]
Message-ID: <7b641200-88b1-8d45-7068-3e9f4d9e0530@quicinc.com> (raw)
In-Reply-To: <20220525033430.1953349-1-qiang1.zhang@intel.com>
On 5/25/2022 9:04 AM, Zqiang wrote:
> When check the 'rdp->nocb_cb_kthread' tasks exists, if is true, however
> the output is the cpu where 'rdp->nocb_gp_kthread' is located. this
> ensure that the tasks in the judgment condition and the tasks of the
> cpu where the output tasks are located are the same tasks.
>
> Signed-off-by: Zqiang <qiang1.zhang@intel.com>
> ---
> kernel/rcu/tree_nocb.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h
> index fa8e4f82e60c..f4ee81d119c8 100644
> --- a/kernel/rcu/tree_nocb.h
> +++ b/kernel/rcu/tree_nocb.h
> @@ -1438,8 +1438,8 @@ static void show_rcu_nocb_gp_state(struct rcu_data *rdp)
> (long)rdp->nocb_gp_seq,
> rnp->grplo, rnp->grphi, READ_ONCE(rdp->nocb_gp_loops),
> rdp->nocb_gp_kthread ? task_state_to_char(rdp->nocb_gp_kthread) : '.',
> - rdp->nocb_cb_kthread ? (int)task_cpu(rdp->nocb_gp_kthread) : -1,
> - show_rcu_should_be_on_cpu(rdp->nocb_cb_kthread));
> + rdp->nocb_gp_kthread ? (int)task_cpu(rdp->nocb_gp_kthread) : -1,
> + show_rcu_should_be_on_cpu(rdp->nocb_gp_kthread));
> }
>
> /* Dump out nocb kthread state for the specified rcu_data structure. */
> @@ -1483,7 +1483,7 @@ static void show_rcu_nocb_state(struct rcu_data *rdp)
> ".B"[!!rcu_cblist_n_cbs(&rdp->nocb_bypass)],
> rcu_segcblist_n_cbs(&rdp->cblist),
> rdp->nocb_cb_kthread ? task_state_to_char(rdp->nocb_cb_kthread) : '.',
> - rdp->nocb_cb_kthread ? (int)task_cpu(rdp->nocb_gp_kthread) : -1,
> + rdp->nocb_cb_kthread ? (int)task_cpu(rdp->nocb_cb_kthread) : -1,
> show_rcu_should_be_on_cpu(rdp->nocb_cb_kthread));
>
Nice !!
Reviewed-by: quic_mojha@quicinc.com
-Mukesh
> /* It is OK for GP kthreads to have GP state. */
next prev parent reply other threads:[~2022-05-25 11:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 3:34 Zqiang
2022-05-25 11:56 ` Mukesh Ojha [this message]
2022-05-31 11:24 ` Zhang, Qiang1
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=7b641200-88b1-8d45-7068-3e9f4d9e0530@quicinc.com \
--to=quic_mojha@quicinc.com \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=qiang1.zhang@intel.com \
--cc=rcu@vger.kernel.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
all inboxes | Powered by JetHome®