[cpp-threads] modes, pass 2
Alexander Terekhov
alexander.terekhov at gmail.com
Mon May 9 15:33:30 BST 2005
On 5/9/05, Doug Lea <dl at cs.oswego.edu> wrote:
> Alexander Terekhov wrote:
> > On 5/9/05, Doug Lea <dl at cs.oswego.edu> wrote:
> >
> > [... isync ...]
> >
> >
> >>Even if that's so, then you should still be able to use isync
> >>in combination with some form of the "if (x == x)" trick?
> >
> >
> > You mean placing isync after "branch never taken"? My understaing
> > is that it (akin to B.2.3 Safe Fetch from Book II) will order only
> > load access to x with respect to subsequent loads (and stores).
> >
> > Classic #loadload is supposed to do more, oder?
> >
>
> This may be actually good enough for nearly all practical
> usages. Issues like this are why I tried going down path of "ordered"
> modes, but that doesn't look promising either.
I think that the trick can be used for your get_acquire(). Ideally,
you'd use it for get_ccacquire() with an indication of path(es) on
which you actually need it (with "all code conditional" as default).
>
> So I think everyone should try harder to find a hack that provides
> cheap LoadLoad on PPC!
And even less constrained (as far as compiler is concerned; and also
cheaper than isync based get_acquire() on PPC) get_hlb() surely won't
hurt either. ;-)
regards,
alexander.
More information about the cpp-threads
mailing list