Memory barriers vs lock/unlock
Paolo Carlini
pcarlini@suse.de
Wed Nov 9 12:16:00 GMT 2005
Alexander Terekhov wrote:
>On 11/8/05, Peter Dimov <pdimov@mmltd.net> wrote:
>[...]
>
>
>>When __exchange_and_add is implemented in terms of __sync_fetch_and_add,
>>which seems to guarantee full ordering
>>
>>
>I recently gathered that at least some of supposedly fully-fenced IA64
>__sync_* intrinsics seem to have mf at the wrong place.
>
>
Thanks Alexander. I will look into this. I wonder if this kind of issue
could be related to some *very* puzzling fails that I'm seeing for MT
tests on 4-way ia64 machines (just have a look to testresults). For
example (these tests really stress only a simple mutex in
locale::global(), however):
FAIL: 22_locale/locale/cons/12658_thread-1.cc execution test
FAIL: 22_locale/locale/cons/12658_thread-2.cc execution test
Maybe it's only a coincidence, because with gcc4.0.x apparently there
are no problems... Or maybe not, being 4.1.x more aggressive at
optimizing may expose weaknesses in fencing somewhere?!?
I would be very grateful if anyone could help. I'm going to work on
that, anyway, I have to do some serious debugging. I can provide
details, run tests on ia64 4-way, whatever: some of the latter is more
suited for private exchange, I think...
Paolo.
More information about the Libstdc++
mailing list