sync/atomic: make load and store fully sequentially consistent on s390x #32428
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
Milestone
As discussed in https://groups.google.com/forum/#!topic/golang-dev/KKfRLcTeb0E loads and stores are not fully sequentially consistent on s390x since loads may be moved before stores if they access independent memory locations. This is similar to the memory model used by amd64.
We can force full sequential consistency of memory accesses by using fast serialization instructions (
SYNC
in Go asm). From discussion in #5045 it seems it is probably worth adding serialization between loads and stores in thesync/atomic
package at least.As far as I can tell the runtime doesn't currently require full sequential consistency, so I'm inclined to leave the atomic implementations as they are until a requirement to change them arises. (Does this sound reasonable @aclements?)
The text was updated successfully, but these errors were encountered: