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

Roman Kennke rkennke at redhat.com
Tue Jul 7 09:42:41 UTC 2020


Pushed:
https://hg.openjdk.java.net/jdk/jdk/rev/a0f6d9504107

One more suggestion: the jcheck script on the hg server complained
about a couple of trailing whitespace and tabs.
1. Configure your editor to not use tabs (some can also eliminate
trailing WS)
2. Install jcheck and run it locally before making a webrev:
https://openjdk.java.net/projects/code-tools/jcheck/

Thanks again for working on this issue!!

Roman

On Mon, 2020-07-06 at 23:45 +0000, Nilsen, Kelvin wrote:
> 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