RFR: 8232782: Shenandoah: streamline post-LRB CAS barrier (aarch64)
Nilsen, Kelvin
kdnilsen at amazon.com
Wed Jun 24 13:54:13 UTC 2020
See http://cr.openjdk.java.net/~kdnilsen/JDK-8232782/webrev.00/
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?
(This is a repost of a message that was posted and bounced yesterday.)
More information about the hotspot-gc-dev
mailing list