4ad/go.arm64

sync/atomic, runtime: re-check all atomic operations

minux opened this issue · 2 comments

It seems our atomic operations might lack memory barriers, as I run
misc/cgo/test for enough number of times, test9400 almost always
timeout due to missed synchronization (esp. when GOMAXPROCS=8).

test9400 requires some assembly, and I coded in the same way as
our sync/atomic functions, so if that test turns out to be wrong, our
sync/atomic routines might be wrong too.

I'd believe that, the number of variations for the LDRX STRX variants
available on arm64 is huge, it's easily to believe we're not using exactly
the right one

On Sun, Feb 22, 2015 at 1:39 PM, Minux Ma notifications@github.com wrote:

It seems our atomic operations might lack memory barriers, as I run
misc/cgo/test for enough number of times, test9400 almost always
timeout due to missed synchronization (esp. when GOMAXPROCS=8).

test9400 requires some assembly, and I coded in the same way as
our sync/atomic functions, so if that test turns out to be wrong, our
sync/atomic routines might be wrong too.


Reply to this email directly or view it on GitHub
https://github.com/4ad/go/issues/139.

4ad commented

FWIW we are using the exact same atomics code as gcc. If we don't, I screwed something up.