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

Roman Kennke rkennke at redhat.com
Tue Jul 7 09:13:40 UTC 2020


Hi Kelvin,

The patch looks good now! Thanks for doing this!

I'll sponsor it.

One note for future changes: for some reason, your webrev doesn't seem
to carry the changeset metadata (your username, the commit message,
etc). It'd be easier to sponsor if you could prepare that too.

(Also, I've just checked https://openjdk.java.net/census#kdnilsen and
I'm wondering why you're Shenandoah author, but not JDK author? I'll
check this too)

Thanks,
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