go.arm64 icon indicating copy to clipboard operation
go.arm64 copied to clipboard

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

Open minux opened this issue 9 years ago • 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.

minux avatar Feb 22 '15 02:02 minux

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 [email protected] 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.

davecheney avatar Feb 22 '15 05:02 davecheney

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

4ad avatar Feb 22 '15 08:02 4ad