RFR: 8262519: AArch64: Unnecessary acquire semantics of memory-order-conservative atomics in C++ Hotspot code
Andrew Dinn
adinn at redhat.com
Mon Mar 8 09:49:18 UTC 2021
On 08/03/2021 07:26, Dong Bo wrote:
> While we didn't have any noticeable improvements with JAVA tests we
> tried, e.g. `test/micro/org/openjdk/bench/vm/gc/Alloc.java`. Seems
> the percentages of the atomics are too low, not to mention the actual
> real-world use case, e.g. Spark, Tomcat.
>
> I guess we do not have to change the `ldaxr` to `ldxr` now, due to we
> haven't seen any significant performance enhancements yet. :-) But I
> feel a little inconsistent that we have code use the stronger
> semantics, while a weaker instruction can still provide the correct
> order semantics.
The outcome reflects my expectation that any program for which this did
make a difference would be a very unusual one (it would have to be
something like a heavily parallel spending most of its time doing
concurrent updates of a shared structure and employing a lock-free model
with a lot of potential for update contention).
I believe it would be better in future to perform investigations when
there is a real world use case indicating there is a problem to be fixed
and that the fix will make a difference. Looking into this change has
taken quite a lot of your time and a lot of reviewer time. That time
could probably have been better spent looking into other things.
regards,
Andrew Dinn
-----------
Red Hat Distinguished Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill
More information about the hotspot-dev
mailing list