zanmato1984 commented on PR #40647: URL: https://github.com/apache/arrow/pull/40647#issuecomment-2016546911
> > Does it actually change anything for x86? > > Wouldn't acq-rel cheaper than original total-ordering? If you mean that if acq-rel is cheaper than the original seq-cst on x86, the answer is no: RMW using acq-rel is promoted to seq-cst on x86. If you mean that if acq-rel is cheaper than x86's "total-store-ordering" memory model, the answer is either no: x86's "total-store-ordering" guarantees acquire-release semantic (actually a little subtly stronger than acquire-release), even for plain loads and stores. Not mentioning the fact the RMW using acq-rel gets promoted to seq-cst. As @felipecrv mentioned, only on weaker memory models such as AArch64 can acq-rel be cheaper than seq-cst - compilers can do reorderings for acq-rel that are not allowed for seq-cst. There are online discussions such as [1] implying that even solely hardware can do this too. [1] https://stackoverflow.com/questions/65568185/for-purposes-of-ordering-is-atomic-read-modify-write-one-operation-or-two -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
