RFR: 8262519: AArch64: Unnecessary acquire semantics of memory-order-conservative atomics in C++ Hotspot code
Andrew Haley
aph at openjdk.java.net
Tue Mar 2 16:03:50 UTC 2021
On Tue, 2 Mar 2021 12:52:59 GMT, Dong Bo <dongbo at openjdk.org> wrote:
> OKAY, this make sense to us.
>
> If it is OK to keep the exclusive part of this patch? :-)
> As far as we know, the exclusive instructions are not being revised.
> And we see `ldxr+stxlr+dmb` have been used in linux kernel since 2014 [1], and still used by now [2].
I know that, but the Linux definition of a "full barrier" isn't quite as strong as HotSpot's ```memory_order_conservative```, so we'd need a much more detailed analysis of what behaviours we can permit. Also, we'd have to find a strong reason to invest time in AArch64 without LSE instructions.
> BTW, the barrier-ordered-before applies with stlxr according to the architecture specification:
Sure, but so what? This is about the entire ldxr/stlxr combination and ```memory_order_conservative``` , in which we try to mimic Intel's "Loads and Stores Are Not Reordered with Locked Instructions" specification.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2788
More information about the hotspot-dev
mailing list