* [PATCH doc] Emphasize that failed atomic operations give no ordering
@ 2024-01-30 14:53 Paul E. McKenney
2024-01-30 16:02 ` Andrea Parri
2024-01-30 17:12 ` Mark Rutland
0 siblings, 2 replies; 5+ messages in thread
From: Paul E. McKenney @ 2024-01-30 14:53 UTC (permalink / raw)
To: linux-kernel, "E.", McKenney
Cc: Alan Stern, Andrea Parri, Will Deacon, Peter Zijlstra, Boqun Feng,
Nicholas Piggin, David Howells, Jade Alglave, Luc Maranget, Paul,
Akira Yokosawa, Daniel Lustig, Joel Fernandes, Mark Rutland,
Jonathan Corbet, linux-arch, linux-doc, Anna-Maria Behnsen
The ORDERING section of Documentation/atomic_t.txt can easily be read as
saying that conditional atomic RMW operations that fail are ordered when
those operations have the _acquire() or _release() prefixes. This is
not the case, therefore update this section to make it clear that failed
conditional atomic RMW operations provide no ordering.
Reported-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Andrea Parri <parri.andrea@gmail.com>
Cc: Will Deacon <will@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jade Alglave <j.alglave@ucl.ac.uk>
Cc: Luc Maranget <luc.maranget@inria.fr>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Akira Yokosawa <akiyks@gmail.com>
Cc: Daniel Lustig <dlustig@nvidia.com>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: <linux-arch@vger.kernel.org>
Cc: <linux-doc@vger.kernel.org>
diff --git a/Documentation/atomic_t.txt b/Documentation/atomic_t.txt
index d7adc6d543db4..bee3b1bca9a7b 100644
--- a/Documentation/atomic_t.txt
+++ b/Documentation/atomic_t.txt
@@ -171,14 +171,14 @@ The rule of thumb:
- RMW operations that are conditional are unordered on FAILURE,
otherwise the above rules apply.
-Except of course when an operation has an explicit ordering like:
+Except of course when a successful operation has an explicit ordering like:
{}_relaxed: unordered
{}_acquire: the R of the RMW (or atomic_read) is an ACQUIRE
{}_release: the W of the RMW (or atomic_set) is a RELEASE
Where 'unordered' is against other memory locations. Address dependencies are
-not defeated.
+not defeated. Conditional operations are still unordered on FAILURE.
Fully ordered primitives are ordered against everything prior and everything
subsequent. Therefore a fully ordered primitive is like having an smp_mb()
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH doc] Emphasize that failed atomic operations give no ordering
2024-01-30 14:53 [PATCH doc] Emphasize that failed atomic operations give no ordering Paul E. McKenney
@ 2024-01-30 16:02 ` Andrea Parri
2024-01-30 16:33 ` Paul E. McKenney
2024-01-30 17:12 ` Mark Rutland
1 sibling, 1 reply; 5+ messages in thread
From: Andrea Parri @ 2024-01-30 16:02 UTC (permalink / raw)
To: Paul E. McKenney
Cc: linux-kernel, "E.", Alan Stern, Will Deacon,
Peter Zijlstra, Boqun Feng, Nicholas Piggin, David Howells,
Jade Alglave, Luc Maranget, Paul, Akira Yokosawa, Daniel Lustig,
Joel Fernandes, Mark Rutland, Jonathan Corbet, linux-arch,
linux-doc, Anna-Maria Behnsen
On Tue, Jan 30, 2024 at 06:53:38AM -0800, Paul E. McKenney wrote:
> The ORDERING section of Documentation/atomic_t.txt can easily be read as
> saying that conditional atomic RMW operations that fail are ordered when
> those operations have the _acquire() or _release() prefixes. This is
s/prefixes/suffixes
> not the case, therefore update this section to make it clear that failed
> conditional atomic RMW operations provide no ordering.
>
> Reported-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
You may want to add a "subsystem" to the subject line, git-log suggests
"Documentation/atomic_t". Anyway,
Acked-by: Andrea Parri <parri.andrea@gmail.com>
Andrea
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH doc] Emphasize that failed atomic operations give no ordering
2024-01-30 16:02 ` Andrea Parri
@ 2024-01-30 16:33 ` Paul E. McKenney
0 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2024-01-30 16:33 UTC (permalink / raw)
To: Andrea Parri
Cc: linux-kernel, "E.", Alan Stern, Will Deacon,
Peter Zijlstra, Boqun Feng, Nicholas Piggin, David Howells,
Jade Alglave, Luc Maranget, Paul, Akira Yokosawa, Daniel Lustig,
Joel Fernandes, Mark Rutland, Jonathan Corbet, linux-arch,
linux-doc, Anna-Maria Behnsen
On Tue, Jan 30, 2024 at 05:02:49PM +0100, Andrea Parri wrote:
> On Tue, Jan 30, 2024 at 06:53:38AM -0800, Paul E. McKenney wrote:
> > The ORDERING section of Documentation/atomic_t.txt can easily be read as
> > saying that conditional atomic RMW operations that fail are ordered when
> > those operations have the _acquire() or _release() prefixes. This is
>
> s/prefixes/suffixes
Good catch, fixed.
> > not the case, therefore update this section to make it clear that failed
> > conditional atomic RMW operations provide no ordering.
> >
> > Reported-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
>
> You may want to add a "subsystem" to the subject line, git-log suggests
> "Documentation/atomic_t". Anyway,
Good point, done.
> Acked-by: Andrea Parri <parri.andrea@gmail.com>
Thank you!
Thanx, Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH doc] Emphasize that failed atomic operations give no ordering
2024-01-30 14:53 [PATCH doc] Emphasize that failed atomic operations give no ordering Paul E. McKenney
2024-01-30 16:02 ` Andrea Parri
@ 2024-01-30 17:12 ` Mark Rutland
2024-01-30 17:58 ` Paul E. McKenney
1 sibling, 1 reply; 5+ messages in thread
From: Mark Rutland @ 2024-01-30 17:12 UTC (permalink / raw)
To: Paul E. McKenney
Cc: linux-kernel, "E.", Alan Stern, Andrea Parri, Will Deacon,
Peter Zijlstra, Boqun Feng, Nicholas Piggin, David Howells,
Jade Alglave, Luc Maranget, Paul, Akira Yokosawa, Daniel Lustig,
Joel Fernandes, Jonathan Corbet, linux-arch, linux-doc,
Anna-Maria Behnsen
On Tue, Jan 30, 2024 at 06:53:38AM -0800, Paul E. McKenney wrote:
> The ORDERING section of Documentation/atomic_t.txt can easily be read as
> saying that conditional atomic RMW operations that fail are ordered when
> those operations have the _acquire() or _release() prefixes. This is
> not the case, therefore update this section to make it clear that failed
> conditional atomic RMW operations provide no ordering.
>
> Reported-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: Andrea Parri <parri.andrea@gmail.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Boqun Feng <boqun.feng@gmail.com>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Jade Alglave <j.alglave@ucl.ac.uk>
> Cc: Luc Maranget <luc.maranget@inria.fr>
> Cc: "Paul E. McKenney" <paulmck@kernel.org>
> Cc: Akira Yokosawa <akiyks@gmail.com>
> Cc: Daniel Lustig <dlustig@nvidia.com>
> Cc: Joel Fernandes <joel@joelfernandes.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: <linux-arch@vger.kernel.org>
> Cc: <linux-doc@vger.kernel.org>
>
> diff --git a/Documentation/atomic_t.txt b/Documentation/atomic_t.txt
> index d7adc6d543db4..bee3b1bca9a7b 100644
> --- a/Documentation/atomic_t.txt
> +++ b/Documentation/atomic_t.txt
> @@ -171,14 +171,14 @@ The rule of thumb:
> - RMW operations that are conditional are unordered on FAILURE,
> otherwise the above rules apply.
>
> -Except of course when an operation has an explicit ordering like:
> +Except of course when a successful operation has an explicit ordering like:
>
> {}_relaxed: unordered
> {}_acquire: the R of the RMW (or atomic_read) is an ACQUIRE
> {}_release: the W of the RMW (or atomic_set) is a RELEASE
>
> Where 'unordered' is against other memory locations. Address dependencies are
> -not defeated.
> +not defeated. Conditional operations are still unordered on FAILURE.
>
> Fully ordered primitives are ordered against everything prior and everything
> subsequent. Therefore a fully ordered primitive is like having an smp_mb()
>
FWIW:
Acked-by: Mark Rutland <mark.rutland@arm.com>
Mark.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH doc] Emphasize that failed atomic operations give no ordering
2024-01-30 17:12 ` Mark Rutland
@ 2024-01-30 17:58 ` Paul E. McKenney
0 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2024-01-30 17:58 UTC (permalink / raw)
To: Mark Rutland
Cc: linux-kernel, "E.", Alan Stern, Andrea Parri, Will Deacon,
Peter Zijlstra, Boqun Feng, Nicholas Piggin, David Howells,
Jade Alglave, Luc Maranget, Paul, Akira Yokosawa, Daniel Lustig,
Joel Fernandes, Jonathan Corbet, linux-arch, linux-doc,
Anna-Maria Behnsen
On Tue, Jan 30, 2024 at 05:12:23PM +0000, Mark Rutland wrote:
> On Tue, Jan 30, 2024 at 06:53:38AM -0800, Paul E. McKenney wrote:
> > The ORDERING section of Documentation/atomic_t.txt can easily be read as
> > saying that conditional atomic RMW operations that fail are ordered when
> > those operations have the _acquire() or _release() prefixes. This is
> > not the case, therefore update this section to make it clear that failed
> > conditional atomic RMW operations provide no ordering.
> >
> > Reported-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > Cc: Alan Stern <stern@rowland.harvard.edu>
> > Cc: Andrea Parri <parri.andrea@gmail.com>
> > Cc: Will Deacon <will@kernel.org>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Boqun Feng <boqun.feng@gmail.com>
> > Cc: Nicholas Piggin <npiggin@gmail.com>
> > Cc: David Howells <dhowells@redhat.com>
> > Cc: Jade Alglave <j.alglave@ucl.ac.uk>
> > Cc: Luc Maranget <luc.maranget@inria.fr>
> > Cc: "Paul E. McKenney" <paulmck@kernel.org>
> > Cc: Akira Yokosawa <akiyks@gmail.com>
> > Cc: Daniel Lustig <dlustig@nvidia.com>
> > Cc: Joel Fernandes <joel@joelfernandes.org>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Jonathan Corbet <corbet@lwn.net>
> > Cc: <linux-arch@vger.kernel.org>
> > Cc: <linux-doc@vger.kernel.org>
> >
> > diff --git a/Documentation/atomic_t.txt b/Documentation/atomic_t.txt
> > index d7adc6d543db4..bee3b1bca9a7b 100644
> > --- a/Documentation/atomic_t.txt
> > +++ b/Documentation/atomic_t.txt
> > @@ -171,14 +171,14 @@ The rule of thumb:
> > - RMW operations that are conditional are unordered on FAILURE,
> > otherwise the above rules apply.
> >
> > -Except of course when an operation has an explicit ordering like:
> > +Except of course when a successful operation has an explicit ordering like:
> >
> > {}_relaxed: unordered
> > {}_acquire: the R of the RMW (or atomic_read) is an ACQUIRE
> > {}_release: the W of the RMW (or atomic_set) is a RELEASE
> >
> > Where 'unordered' is against other memory locations. Address dependencies are
> > -not defeated.
> > +not defeated. Conditional operations are still unordered on FAILURE.
> >
> > Fully ordered primitives are ordered against everything prior and everything
> > subsequent. Therefore a fully ordered primitive is like having an smp_mb()
> >
>
> FWIW:
>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
Applied, thank you!
Thanx, Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-30 17:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30 14:53 [PATCH doc] Emphasize that failed atomic operations give no ordering Paul E. McKenney
2024-01-30 16:02 ` Andrea Parri
2024-01-30 16:33 ` Paul E. McKenney
2024-01-30 17:12 ` Mark Rutland
2024-01-30 17:58 ` Paul E. McKenney
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).