RFR: 8261492: Shenandoah: reconsider forwardee accesses memory ordering [v2]

Aleksey Shipilev shade at openjdk.java.net
Fri Feb 12 07:29:43 UTC 2021


On Thu, 11 Feb 2021 18:08:49 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

> Do we really need to change shenandoahBarrierSetAssembler_aarch64.cpp?
> Address dependency ensures the ordering. Or is there anything missing?

True, we could use address dependency for the ordering. This thing is more or less load-consume of the newly promoted object. But, I think reasoning with (stronger) acquires is more versatile for the code we do not control (C++ generally discourages using `memory_order_consume`; that is why our C++ code acquires mark word). While we control the assembler insns sequence, it seems good to match that. It does not seem worth over-relaxing the rare path: the CAS failure path under running GC.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2496


More information about the shenandoah-dev mailing list