[cpp-threads] Yet another visibility question

Alexander Terekhov alexander.terekhov at gmail.com
Thu Jan 11 07:56:58 GMT 2007


On 1/10/07, Hans Boehm <Hans.Boehm at hp.com> wrote:

[... about dependencies ...]

> (Does the combined fence run appreciably slower on SPARC than the
> two variants?)

Somewhat related:

http://groups.google.com/group/comp.programming.threads/msg/af6be39d31c293af
(see mutex_enter)

http://groups.google.com/group/comp.programming.threads/msg/8bdc77efe247226c

<quote>

Exactly -- and the #LoadStore can be dropped, since the branch (to
test if you got the lock) makes any later stores dependent on the
loaded value from the CAS. (SparcV9 D.3.3 (1) establishes dependant
order, D.4.4 (1) guarantees memory order).

(the change in membars gave about a 7% performance improvement on
UltraSparc IIs...)

</quote>

7% performance improvement... not bad (I don't know how much can be
attributed to elimination of SC-ish StoreLoad alone).

regards,
alexander.



More information about the cpp-threads mailing list