[cpp-threads] SC on PPC
Alexander Terekhov
alexander.terekhov at gmail.com
Wed May 2 09:34:14 BST 2007
On 5/1/07, Hans Boehm <Hans.Boehm at hp.com> wrote:
>
>
> On Tue, 1 May 2007, Alexander Terekhov wrote:
>
> [Raul:?]
> > >
> > > This depends on how you define acquire, but if it is defined to
> > > enforce causality it is insufficient. In particular, it wouldn't
> > > support this case:
> > >
> > > P1: x=1
> > > P2: if (x.load_acquire()==1) { y.store_relaxed(1) }
> > > P3: if (y.load_acquire()==1) { Assert(x.load_relaxed()==1) }
> >
> > Well, consider that on Itanium
> >
> > P1: x.store_relaxed(1)
> > P2: if (x.load_acquire()==1) { y.store_relaxed(1) }
> > P3: if (y.load_acquire()==1) { Assert(x.load_relaxed()==1) }
> >
> > may well abort.
> >
> > I'd define *acquire* no stronger than Itanium and wouldn't impose
> > remote write atomicity for release (relax release in this respect).
> >
> I think (and hope) we're arguing about a bug in the example here. The
I'm talking about the cost of acquire on PPC.
P1: x.store_relaxed(1)
P2: if (x.load_relaxed()==1) { y.store_release(1) }
P3: if (y.load_acquire()==1) { Assert(x.load_relaxed()==1) }
wont abort with
load_acquire: load;"branch never taken";isync // see B.2.3 Safe
Fetch (Book II).
store_release: lwsync;store
I don't want to have more constrained
load_acquire: load;lwsync
regards,
alexander.
More information about the cpp-threads
mailing list