[cpp-threads] SC on PPC
Paul E. McKenney
paulmck at linux.vnet.ibm.com
Wed May 2 16:21:30 BST 2007
On Wed, May 02, 2007 at 08:06:12AM -0700, Hans Boehm wrote:
>
>
> On Wed, 2 May 2007, Alexander Terekhov wrote:
>
> >
> > 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
> >
> Certainly that's an interesting question. On the other hand, I'm saying
> that in the proposed C++ memory model, this is allowed to abort unless you
> change the initial store_relaxed to a store_release.
>
> I susoect this has little bearing on the rest of your discussion, though.
> And I can't think of realistic situations in which you wouldn't need the
> store_release in P1 anyway.
Well, it does look like we have a vote for control dependencies. ;-)
Thanx, Paul
More information about the cpp-threads
mailing list