From: Frederic Weisbecker <frederic@kernel.org>
To: Joel Fernandes <joelagnelf@nvidia.com>
Cc: paulmck@kernel.org, LKML <linux-kernel@vger.kernel.org>,
Boqun Feng <boqun.feng@gmail.com>,
Joel Fernandes <joel@joelfernandes.org>,
Neeraj Upadhyay <neeraj.upadhyay@amd.com>,
Uladzislau Rezki <urezki@gmail.com>,
Zqiang <qiang.zhang1211@gmail.com>, rcu <rcu@vger.kernel.org>
Subject: Re: [PATCH 2/3] rcu/exp: Remove confusing needless full barrier on task unblock
Date: Wed, 26 Feb 2025 16:34:52 +0100 [thread overview]
Message-ID: <Z780nGXxjiVMSvXa@localhost.localdomain> (raw)
In-Reply-To: <c0c0f393-fa50-4437-80b2-f38d65b43fab@nvidia.com>
Le Wed, Feb 26, 2025 at 10:26:34AM -0500, Joel Fernandes a écrit :
>
>
> On 2/26/2025 10:04 AM, Paul E. McKenney wrote:
> >>> I was wondering if you could also point to the fastpath that this is racing
> >>> with, it is not immediately clear (to me) what this smp_mb() is pairing with
> >>> 🙁
> >> It is supposed to pair with the barrier in sync_exp_work_done() but then again
> >> this is already enforced by the smp_mb__after_unlock_lock() chained through
> >> rnp locking.
> > You could interpret that "Order GP completion with preceding accesses"
> > to include preceding readers, which to your point sounds plausible.
> > And in that case, again as you say, the raw_spin_lock_irqsave_rcu_node()
> > in rcu_report_exp_rnp() provides the needed ordering.
> >
> > I think. 😉
>
> This is for the case where readers are blocked. For the case where readers were
> not blocked, and we exited the RSCS, we just expect the regular QS reporting
> paths to call into rcu_report_exp_rnp() and similarly provide the full memory
> barrier (smp_mb) on the now-reader-unlocked-CPU right?
Right, again through rnp locking and smp_mb__after_unlock_lock().
>
> Just wanted to check my understanding was correct :)
>
> Also if I may paraphrase the ordering requirement here, we do not want RCU
> readers to observe any modifications happening to data after the GP has ended
> (i.e. synchronize_rcu_expedited() has returned). Similarly, we do not want
> updates in the pre-existing readers to not be visible to accesses after the GP
> has ended. Right?
Exactly!
Thanks.
>
> thanks,
>
> - Joel
next prev parent reply other threads:[~2025-02-26 15:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 23:25 [PATCH 0/3] rcu/exp updates Frederic Weisbecker
2025-02-13 23:25 ` [PATCH 1/3] rcu/exp: Protect against early QS report Frederic Weisbecker
2025-02-14 9:10 ` Paul E. McKenney
2025-03-13 16:40 ` Frederic Weisbecker
2025-03-13 17:04 ` Paul E. McKenney
2025-02-13 23:25 ` [PATCH 2/3] rcu/exp: Remove confusing needless full barrier on task unblock Frederic Weisbecker
2025-02-25 21:59 ` Joel Fernandes
2025-02-26 0:08 ` Paul E. McKenney
2025-02-26 12:52 ` Frederic Weisbecker
2025-02-26 15:04 ` Paul E. McKenney
2025-02-26 15:26 ` Joel Fernandes
2025-02-26 15:34 ` Frederic Weisbecker [this message]
2025-02-13 23:25 ` [PATCH 3/3] rcu/exp: Remove needless CPU up quiescent state report Frederic Weisbecker
2025-02-14 9:01 ` Paul E. McKenney
2025-02-14 12:10 ` Frederic Weisbecker
2025-02-15 10:38 ` Paul E. McKenney
2025-02-15 22:23 ` Frederic Weisbecker
2025-02-19 14:58 ` Paul E. McKenney
2025-02-19 15:55 ` Paul E. McKenney
2025-02-21 15:31 ` Frederic Weisbecker
2025-02-21 15:52 ` Frederic Weisbecker
2025-02-26 0:00 ` Paul E. McKenney
2025-03-03 20:10 ` Paul E. McKenney
2025-03-14 14:39 ` Frederic Weisbecker
2025-03-18 17:07 ` 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=Z780nGXxjiVMSvXa@localhost.localdomain \
--to=frederic@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=joel@joelfernandes.org \
--cc=joelagnelf@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neeraj.upadhyay@amd.com \
--cc=paulmck@kernel.org \
--cc=qiang.zhang1211@gmail.com \
--cc=rcu@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.