linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: "Woodhouse, David" <dwmw@amazon.co.uk>
Cc: "mathieu.desnoyers@efficios.com" <mathieu.desnoyers@efficios.com>,
	"quic_neeraju@quicinc.com" <quic_neeraju@quicinc.com>,
	"jiangshanlai@gmail.com" <jiangshanlai@gmail.com>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"josh@joshtriplett.org" <josh@joshtriplett.org>,
	"joel@joelfernandes.org" <joel@joelfernandes.org>,
	"urezki@gmail.com" <urezki@gmail.com>,
	"frederic@kernel.org" <frederic@kernel.org>,
	"rcu@vger.kernel.org" <rcu@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"boqun.feng@gmail.com" <boqun.feng@gmail.com>
Subject: Re: [PATCH] rcu: Make rcu_state.n_online_cpus updates atomic
Date: Mon, 13 Dec 2021 11:32:56 -0800	[thread overview]
Message-ID: <20211213193256.GR641268@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <471d6615f245168d4c6c96c7ac1ccabf56b75945.camel@amazon.co.uk>

On Mon, Dec 13, 2021 at 08:09:22AM +0000, Woodhouse, David wrote:
> On Mon, 2021-12-13 at 12:30 +0530, Neeraj Upadhyay wrote:
> > To support onlining multiple CPUs concurrently,
> > change rcu_state.n_online_cpus updates to be atomic.
> > Note, it's ok for rcu_blocking_is_gp() to do a
> > atomic_read(&rcu_state.n_online_cpus), as the
> > value of .n_online_cpus switches from 1->2, in
> > rcutree_prepare_cpu(), which runs before the new
> > CPU comes online. Similarly 2->1 transition happens
> > from rcutree_dead_cpu(), which executes after the
> > CPU is offlined, and runs on the last online CPU.
> > 
> > Signed-off-by: Neeraj Upadhyay <quic_neeraju@quicinc.com>
> 
> In my parallel-bringup series, the prepare stages are still being
> executed in series on the BSP, so I don't think this patch is needed
> yet. I'm not sure we'd ever end up with the prepare stages being done
> in parallel — the most I see us doing is onlining a single *batch* of
> CPUs at a time, much like bringup_nonboot_cpus() does.
> 
> But this patch certainly doesn't *hurt*.
> 
> Acked-by: David Woodhouse <dwmw@amazon.co.uk>

Queued for further review and testing.

To Frederic's point, this won't go to mainline unless it is actually
needed, but it will at least be pulled into a branch in -rcu marked with
a tag for future reference.

							Thanx, Paul

  reply	other threads:[~2021-12-13 19:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-13  7:00 [PATCH] rcu: Make rcu_state.n_online_cpus updates atomic Neeraj Upadhyay
2021-12-13  8:09 ` Woodhouse, David
2021-12-13 19:32   ` Paul E. McKenney [this message]
2021-12-13 21:21     ` Frederic Weisbecker
2021-12-13 13:06 ` Frederic Weisbecker

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=20211213193256.GR641268@paulmck-ThinkPad-P17-Gen-1 \
    --to=paulmck@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=dwmw@amazon.co.uk \
    --cc=frederic@kernel.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=quic_neeraju@quicinc.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=urezki@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).