RFR: 8232782: Shenandoah: streamline post-LRB CAS barrier (aarch64) (version 2)

Nilsen, Kelvin kdnilsen at amazon.com
Tue Jun 30 22:39:40 UTC 2020


Thank you for feedback from previously distributed draft patch.  This new patch is similar to the patch distributed on June 24.  However, this version uses MacroAssembler::cmpxchng() instead of hard-coding the use of ldxr/stxr instructions.

See http://cr.openjdk.java.net/~kdnilsen/JDK-8232782/webrev.02/

This patch addresses the problem described in https://bugs.openjdk.java.net/browse/JDK-8232782

The implementation mimics the behavior of the recently revised x86 implementation of cmpxchg_oop with slight refinements:

X86 version:
Step 1: Try CAS
Step 2: if CAS fails, check if original memory holds equivalent from-space pointer
Step 3: Use CAS to overwrite memory with equivalent to-space pointer
Step 4: Try CAS again
Step 5: Return boolean result to indicate success or failure

AARCH64 version:
Step 1: Try CAS
Step 2: if CAS fails, check if original memory holds equivalent from-space pointer
Step 3 (differs): Do not overwrite memory with equivalent to-space pointer,  Instead, run the original CAS request with from-space pointer as the "expected" value. If this succeeds, we're done.  If this fails, go back to step 1 and try that again.

Step 5: Return boolean result to indicate success or failure

This patch satisfies tier1, tier2, and hotspot_gc_shenandoah regression tests on Ubuntu 18.04.4 LTS (GNU/Linux 5.3.0-1023-aws aarch64).  I have also run an "extreme" garbage collection workload for 20 minutes without problem.

Is this ok to merge?





More information about the shenandoah-dev mailing list