On Mon, 2011-12-19 at 15:17 -0800, Richard Henderson wrote:
> On 12/19/2011 02:58 PM, Torvald Riegel wrote:
> > In the particular case (the validated loads technique used in
> > method-gl.cc, load(), store(), and validate()), we actually do not need
> > to have loads or stores to be really atomic, but need the compiler to
> > treat them as if they were atomics wrt. to reordering etc. (e.g., wrt.
> > adjacent fences).  Right now, I'm relying on the fact that GCC doesn't
> > optimize atomics yet and am just using nonatomic loads/stores.
> 
> For 4.7, these accesses need to be volatile if they're to interact
> with the adjacent atomic ops.

What do you mean by "interact"?  AFAIU Andrew, currently atomics act as
full optimization barriers, leaving nonatomic memory accesses in place
somewhere between the surrounding atomic accesses.

> 
> > Tested on x86 with STAMP and microbenchmarks.
> 
> You could try testing on gcc110.fsffrance.org, a POWER7 machine.

Will look into this.

> But other than the patch not being rebased vs master,

Oops.  Forgot about that...

> it looks like
> an improvement overy my first attempt.

OK.  Then I will commit in the next few days until further testing shows
any errors, or somebody has further comments/corrections.


Reply via email to