linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Woodhouse, David" <dwmw@amazon.co.uk>
To: "mathieu.desnoyers@efficios.com" <mathieu.desnoyers@efficios.com>,
	"quic_neeraju@quicinc.com" <quic_neeraju@quicinc.com>,
	"paulmck@kernel.org" <paulmck@kernel.org>,
	"jiangshanlai@gmail.com" <jiangshanlai@gmail.com>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"josh@joshtriplett.org" <josh@joshtriplett.org>,
	"joel@joelfernandes.org" <joel@joelfernandes.org>
Cc: "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 08:09:22 +0000	[thread overview]
Message-ID: <471d6615f245168d4c6c96c7ac1ccabf56b75945.camel@amazon.co.uk> (raw)
In-Reply-To: <20211213070059.6381-1-quic_neeraju@quicinc.com>

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>





Amazon Development Centre (London) Ltd. Registered in England and Wales with registration number 04543232 with its registered office at 1 Principal Place, Worship Street, London EC2A 2FA, United Kingdom.



  reply	other threads:[~2021-12-13  8:09 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 [this message]
2021-12-13 19:32   ` Paul E. McKenney
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=471d6615f245168d4c6c96c7ac1ccabf56b75945.camel@amazon.co.uk \
    --to=dwmw@amazon.co.uk \
    --cc=boqun.feng@gmail.com \
    --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=paulmck@kernel.org \
    --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).