From: Joel Fernandes <joel@joelfernandes.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: linux-kernel@vger.kernel.org, Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Corbet <corbet@lwn.net>,
Josh Triplett <josh@joshtriplett.org>,
Lai Jiangshan <jiangshanlai@gmail.com>,
linux-doc@vger.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
neeraju@codeaurora.org, peterz@infradead.org,
Randy Dunlap <rdunlap@infradead.org>,
rcu@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>,
tglx@linutronix.de, vineethrp@gmail.com
Subject: Re: [PATCH v4 2/5] rcu/tree: Clarify comments about FQS loop reporting quiescent states
Date: Mon, 10 Aug 2020 15:22:34 -0400 [thread overview]
Message-ID: <20200810192234.GC2865655@google.com> (raw)
In-Reply-To: <20200810180647.GN4295@paulmck-ThinkPad-P72>
On Mon, Aug 10, 2020 at 11:06:47AM -0700, Paul E. McKenney wrote:
> On Fri, Aug 07, 2020 at 01:07:19PM -0400, Joel Fernandes (Google) wrote:
> > At least since v4.19, the FQS loop no longer reports quiescent states
> > for offline CPUs unless it is an emergency.
> >
> > This commit therefore fixes the comment in rcu_gp_init() to match the
> > current code.
> >
> > Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
> > ---
> > kernel/rcu/tree.c | 8 +++++---
> > 1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> > index a49fa3b60faa..2fb66cdbfa25 100644
> > --- a/kernel/rcu/tree.c
> > +++ b/kernel/rcu/tree.c
> > @@ -1701,9 +1701,11 @@ static bool rcu_gp_init(void)
> >
> > /*
> > * Apply per-leaf buffered online and offline operations to the
> > - * rcu_node tree. Note that this new grace period need not wait
> > - * for subsequent online CPUs, and that quiescent-state forcing
> > - * will handle subsequent offline CPUs.
> > + * rcu_node tree. Note that this new grace period need not wait for
> > + * subsequent online CPUs, and that RCU hooks in the CPU offlining
> > + * path, when combined with checks in this function, will handle CPUs
> > + * that are currently going offline or that go offline later. Refer to
> > + * RCU's Requirements documentation about hotplug requirements as well.
> > */
> > rcu_state.gp_state = RCU_GP_ONOFF;
> > rcu_for_each_leaf_node(rnp) {
>
> Very good! I pulled this in with light edits as shown below.
> Please let me know if I messed something up.
Yes, looks good, thanks!
- Joel
>
> Thanx, Paul
>
> ------------------------------------------------------------------------
>
> commit a6117399840b963f90cc5322ef9ea7c52de639b2
> Author: Joel Fernandes (Google) <joel@joelfernandes.org>
> Date: Fri Aug 7 13:07:19 2020 -0400
>
> rcu/tree: Clarify comments about FQS loop reporting quiescent states
>
> Since at least v4.19, the FQS loop no longer reports quiescent states
> for offline CPUs except in emergency situations.
>
> This commit therefore fixes the comment in rcu_gp_init() to match the
> current code.
>
> Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index bcc6160..59e1943 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -1730,10 +1730,13 @@ static bool rcu_gp_init(void)
> raw_spin_unlock_irq_rcu_node(rnp);
>
> /*
> - * Apply per-leaf buffered online and offline operations to the
> - * rcu_node tree. Note that this new grace period need not wait
> - * for subsequent online CPUs, and that quiescent-state forcing
> - * will handle subsequent offline CPUs.
> + * Apply per-leaf buffered online and offline operations to
> + * the rcu_node tree. Note that this new grace period need not
> + * wait for subsequent online CPUs, and that RCU hooks in the CPU
> + * offlining path, when combined with checks in this function,
> + * will handle CPUs that are currently going offline or that will
> + * go offline later. Please also refer to "Hotplug CPU" section
> + * of RCU's Requirements documentation.
> */
> rcu_state.gp_state = RCU_GP_ONOFF;
> rcu_for_each_leaf_node(rnp) {
next prev parent reply other threads:[~2020-08-10 19:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-07 17:07 [PATCH v4 0/5] option-subject: RCU and CPU hotplug checks and docs Joel Fernandes (Google)
2020-08-07 17:07 ` [PATCH v4 1/5] rcu/tree: Add a warning if CPU being onlined did not report QS already Joel Fernandes (Google)
2020-08-10 15:46 ` Paul E. McKenney
2020-08-10 17:39 ` Joel Fernandes
2020-08-10 17:57 ` Paul E. McKenney
2020-08-10 19:25 ` Joel Fernandes
2020-08-10 20:20 ` Paul E. McKenney
2020-08-07 17:07 ` [PATCH v4 2/5] rcu/tree: Clarify comments about FQS loop reporting quiescent states Joel Fernandes (Google)
2020-08-10 18:06 ` Paul E. McKenney
2020-08-10 19:22 ` Joel Fernandes [this message]
2020-08-07 17:07 ` [PATCH v4 3/5] rcu/tree: Make FQS complaining about offline CPU more aggressive Joel Fernandes (Google)
2020-08-10 20:56 ` Paul E. McKenney
2020-08-07 17:07 ` [PATCH v4 4/5] rcutorture: Force synchronizing of RCU flavor from hotplug notifier Joel Fernandes (Google)
2020-08-10 16:19 ` Paul E. McKenney
2020-08-10 17:31 ` Joel Fernandes
2020-08-10 17:54 ` Paul E. McKenney
2020-08-10 19:41 ` Joel Fernandes
2020-08-07 17:07 ` [PATCH v4 5/5] docs: Update RCU's hotplug requirements with a bit about design Joel Fernandes (Google)
2020-08-08 2:10 ` Randy Dunlap
2020-08-10 17:41 ` Joel Fernandes
2020-08-07 18:31 ` [PATCH v4 0/5] option-subject: RCU and CPU hotplug checks and docs Joel Fernandes
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=20200810192234.GC2865655@google.com \
--to=joel@joelfernandes.org \
--cc=corbet@lwn.net \
--cc=dave@stgolabs.net \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mchehab+samsung@kernel.org \
--cc=neeraju@codeaurora.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=vineethrp@gmail.com \
/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).