This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Linux: Implement membarrier function
- From: Alan Stern <stern at rowland dot harvard dot edu>
- To: "Paul E. McKenney" <paulmck at linux dot ibm dot com>
- Cc: David Goldblatt <davidtgoldblatt at gmail dot com>, <mathieu dot desnoyers at efficios dot com>, Florian Weimer <fweimer at redhat dot com>, <triegel at redhat dot com>, <libc-alpha at sourceware dot org>, <andrea dot parri at amarulasolutions dot com>, <will dot deacon at arm dot com>, <peterz at infradead dot org>, <boqun dot feng at gmail dot com>, <npiggin at gmail dot com>, <dhowells at redhat dot com>, <j dot alglave at ucl dot ac dot uk>, <luc dot maranget at inria dot fr>, <akiyks at gmail dot com>, <dlustig at nvidia dot com>, <linux-arch at vger dot kernel dot org>, <linux-kernel at vger dot kernel dot org>
- Date: Wed, 12 Dec 2018 13:04:44 -0500 (EST)
- Subject: Re: [PATCH] Linux: Implement membarrier function
On Wed, 12 Dec 2018, Paul E. McKenney wrote:
> > > > Or am I still missing something here?
> > >
> > > You tell me...
> >
> > I think I am on board. ;-)
>
> And more to the point, here is a three-process variant showing a cycle
> that is permitted:
>
>
> P0 P1 P2
> Wa=2 Wb=2 Wc=2
> mb0s
> [mb01] [mb02]
> mb0e
> Rb=0 Rc=0 Ra=0
>
> As can be seen by reordering it as follows:
>
> P0 P1 P2
> Ra=0
> Wa=2
> mb0s
> [mb01]
> Rc=0
> Wc=2
> [mb02]
> mb0e
> Rb=0
> Wb=2
>
> Make sense?
You got it!
Alan