RFR: 8334060: Implementation of Late Barrier Expansion for G1 [v2]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Mon Aug 26 08:32:06 UTC 2024
On Fri, 23 Aug 2024 13:33:09 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
>> Thanks for the reference, I would still prefer to keep this part as is for simplicity. We can always optimize the atomic barriers in follow-up work, if a need arises.
>
> After thinking more about this, I figured out that we can optimize more when moving the pre_barrier after the cmpxchg. We can skip all G1 barriers if the cmpxchg fails:
> https://github.com/TheRealMDoerr/jdk/blob/0aedfb0aa1c545319257c0e613066b91404a07ca/src/hotspot/cpu/ppc/gc/g1/g1_ppc.ad#L171
> The cmpxchg jumps to no_update on failure. This may reduce load on GC queue handling and related work for GC threads. I'm testing this version and I actually like it more than the version I had before. Please take a look.
>
> (Note that my final version will need https://github.com/openjdk/jdk/pull/20689 to be integrated and merged into your PR.)
Right, that makes sense since for PPC's cmpxchg implementation (unlike x64 or aarch64+LSE) you are already explicitly branching on failure anyway.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19746#discussion_r1730891297
More information about the hotspot-compiler-dev
mailing list