RFR: 8232782: Shenandoah: streamline post-LRB CAS barrier (aarch64) (version 3)
Nilsen, Kelvin
kdnilsen at amazon.com
Mon Jul 6 23:45:48 UTC 2020
Thank you for feedback from previously distributed draft patch. This new version of the patch differs from the June 30 version in the following regards:
1. I have removed the weak argument from the function, its prototype, and all invocation points.
2. I no longer assume that expected and the value held in memory are not NULL.
See http://cr.openjdk.java.net/~kdnilsen/JDK-8232782/webrev.04/
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