From: Frederic Weisbecker <frederic@kernel.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Puranjay Mohan <puranjay@kernel.org>,
rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org,
Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
Joel Fernandes <joelagnelf@nvidia.com>,
Josh Triplett <josh@joshtriplett.org>,
Boqun Feng <boqun@kernel.org>,
Uladzislau Rezki <urezki@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Zqiang <qiang.zhang@linux.dev>,
Masami Hiramatsu <mhiramat@kernel.org>,
Davidlohr Bueso <dave@stgolabs.net>,
Breno Leitao <leitao@debian.org>
Subject: Re: [PATCH v1 06/11] rcu: Enable RCU callbacks to benefit from expedited grace periods
Date: Tue, 21 Jul 2026 14:06:45 +0200 [thread overview]
Message-ID: <al9g1Zq4_MkGD0I0@localhost.localdomain> (raw)
In-Reply-To: <cf1a3ffc-ed2a-41f4-bfd2-cbeab9d06861@paulmck-laptop>
Le Mon, Jul 20, 2026 at 09:55:42AM -0700, Paul E. McKenney a écrit :
> On Mon, Jul 20, 2026 at 04:22:33PM +0200, Frederic Weisbecker wrote:
> > Le Tue, Jul 14, 2026 at 11:48:08AM -0700, Paul E. McKenney a écrit :
> > > > I have similar concerns about the three smp_mb() in
> > > > get_state_synchronize_rcu_full(). It could be just two (rcu_seq_snap()
> > > > has a barrier that could be just one). Not sure if that matters but,
> > > > just wanted to point that.
> > >
> > > We need the one at the beginning of get_state_synchronize_rcu_full(),
> > > but from what I can see, not the ones in the calls to rcu_seq_snap().
> > > I blame laziness. We could make an rcu_seq_snap_no_ordering() that
> > > didn't have the smp_mb(), but I didn't believe that the overhead would
> > > be visible at the system level.
> >
> > It isn't so much about performance than being clear about ordering
> > expectations. Though we could argue that grace period polling can be
> > about performance.
> >
> > But in general rcu_seq_snap() advertizes:
> >
> > READ seq
> > smp_mb() /* Above access must not bleed into critical section. */
> >
> > This doesn't tell much. Which critical section? That's not used on
> > read side.
>
> Fair question!
>
> And the answer is "any critical section that might later be executed by
> the current task."
But why does it matter, what could go wrong for example?
>
> Would it help if I made that comment read as follows, separately from
> Puranjay's series?
>
> // The above access must not bleed into any later RCU read-side
> // critical section executed by the current task.
>
> Thanx, Paul
--
Frederic Weisbecker
SUSE Labs
next prev parent reply other threads:[~2026-07-21 12:06 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 13:23 [PATCH v1 00/11] RCU: Enable callbacks to benefit from expedited grace periods Puranjay Mohan
2026-06-24 13:23 ` [PATCH v1 01/11] rcu: Rename struct rcu_gp_oldstate to rcu_gp_seq Puranjay Mohan
2026-07-09 11:47 ` Frederic Weisbecker
2026-06-24 13:23 ` [PATCH v1 02/11] rcu/segcblist: Add SRCU and Tasks RCU wrapper functions Puranjay Mohan
2026-07-09 11:51 ` Frederic Weisbecker
2026-06-24 13:23 ` [PATCH v1 03/11] rcu/segcblist: Factor out rcu_segcblist_advance_compact() helper Puranjay Mohan
2026-07-09 13:21 ` Frederic Weisbecker
2026-06-24 13:23 ` [PATCH v1 04/11] rcu/segcblist: Track segment grace periods with struct rcu_gp_seq Puranjay Mohan
2026-07-09 13:33 ` Frederic Weisbecker
2026-06-24 13:23 ` [PATCH v1 05/11] rcu: Add RCU_GET_STATE_NOT_TRACKED for subsystems without expedited GPs Puranjay Mohan
2026-07-09 13:48 ` Frederic Weisbecker
2026-06-24 13:23 ` [PATCH v1 06/11] rcu: Enable RCU callbacks to benefit from expedited grace periods Puranjay Mohan
2026-07-09 13:58 ` Frederic Weisbecker
2026-07-09 15:36 ` Puranjay Mohan
2026-07-10 13:58 ` Frederic Weisbecker
2026-07-14 18:48 ` Paul E. McKenney
2026-07-20 14:22 ` Frederic Weisbecker
2026-07-20 16:55 ` Paul E. McKenney
2026-07-21 12:06 ` Frederic Weisbecker [this message]
2026-06-24 13:23 ` [PATCH v1 07/11] rcu: Update comments for gp_seq and expedited GP tracking Puranjay Mohan
2026-07-20 14:56 ` Frederic Weisbecker
2026-06-24 13:23 ` [PATCH v1 08/11] rcu: Wake NOCB rcuog kthreads on expedited grace period completion Puranjay Mohan
2026-07-20 15:56 ` Frederic Weisbecker
2026-06-24 13:23 ` [PATCH v1 09/11] rcu: Detect expedited grace period completion in rcu_pending() Puranjay Mohan
2026-07-21 12:45 ` Frederic Weisbecker
2026-07-21 14:32 ` Paul E. McKenney
2026-06-24 13:23 ` [PATCH v1 10/11] rcu: Advance callbacks for expedited GP completion in rcu_core() Puranjay Mohan
2026-07-21 14:35 ` Frederic Weisbecker
2026-07-21 15:06 ` Puranjay Mohan
2026-06-24 13:23 ` [PATCH v1 11/11] rcuscale: Add concurrent expedited GP threads for callback scaling tests Puranjay Mohan
2026-07-20 18:02 ` [PATCH v1 00/11] RCU: Enable callbacks to benefit from expedited grace periods Paul E. McKenney
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=al9g1Zq4_MkGD0I0@localhost.localdomain \
--to=frederic@kernel.org \
--cc=boqun@kernel.org \
--cc=dave@stgolabs.net \
--cc=jiangshanlai@gmail.com \
--cc=joelagnelf@nvidia.com \
--cc=josh@joshtriplett.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=neeraj.upadhyay@kernel.org \
--cc=paulmck@kernel.org \
--cc=puranjay@kernel.org \
--cc=qiang.zhang@linux.dev \
--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