[cpp-threads] Alternatives to SC (reader cost of SC on JSR133)

Raul Silvera rauls at ca.ibm.com
Mon Feb 5 19:55:52 GMT 2007



Doug Lea wrote on 02/01/2007 02:22:24 PM:
>
> Almost. The "SC issue" stems from:
>
> When you use "reasonable" mappings for (Java)volatiles/(C++)atomics,
> and compare best interpretations of platform specs vs
> memory model specs, everything meshes except for the assertion
> that you get SC. (CCCC serves as a non-hardware-specific
> abstract model of what you get instead.)
>
> But it becomes more interesting than this, because it is not
> necessarily the case that you get SC even if you *do* place
> the strongest kind of barrier available on a platform between
> each load. Instead, SC may require the use of "confirming"
> CAS or LL/SC for each load, which completely escapes all
> notions of reasonableness for mappings.
>
>
> -Doug

Thanks. My main point was that the cost of SC is borne by both readers and
writers, not just writers. I see you agree with that.

The question on whether the reader cost is an additional StoreLoad fence or
an even more expensive mechanism (such as CAS) is probably specific to each
platform. We are still having a strong debate internally at IBM on this
topic regarding PowerPC.

--
Raúl E. Silvera         IBM Toronto Lab   Team Lead, Toronto Portable
Optimizer (TPO)
Tel: 905-413-4188 T/L: 969-4188           Fax: 905-413-4854
D2/KC9/8200/MKM





More information about the cpp-threads mailing list