lkml.org 
[lkml]   [2017]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH]: documentation,atomic: Add a new atomic_t document
Hi Peter,

On Fri, Jun 09, 2017 at 09:36:04PM +0200, Peter Zijlstra wrote:
[...]
> > > +Ordering: (go read memory-barriers.txt first)
> > > +
> > > +The rule of thumb:
> > > +
> > > + - non-RmW operations are unordered;
> > > +
> > > + - RmW operations that have no return value are unordered;
> > > +
> > > + - RmW operations that have a return value are Sequentially Consistent;
> >
> > I think it's stronger than that, because they also order non-RmW operations,
> > whereas this makes it sounds like there's just a total order over all RmW
> > operations.
>
> Right, what should I call it?
>

I think the term we use to refer this behavior is "fully-ordered"? Could
we give it a slight formal definition like:

a. memory operations preceding and following the RmW operation is
Sequentially Consistent.

b. load or store part of the RmW operation is Sequentially
Consistent with operations preceding or following.

Though, sounds like defining "fully-ordered" is the job for
memory-barriers.txt, but it's never done ;-)

Regards,
Boqun



> > > + - RmW operations that are conditional are unordered on FAILURE, otherwise the
> > > + above rules apply.
> >
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-06-12 01:57    [W:0.095 / U:0.160 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site