C2 compare and swap fixes
Andrew Haley
aph at redhat.com
Mon Jun 6 08:45:12 UTC 2016
On 06/06/16 09:01, Roland Westrelin wrote:
> What follows is my own interpretation: in case the value in memory is a
> from space reference and the expected value passed to weakCAS is a to
> space value, then the weakCAS would fail as long as the value in memory
> is not updated to the to space value which as I understand, could cause
> a thread to be stuck in a loop with a weakCAS until the GC threads
> finally update the reference and could be a long time. So I don't think
> we can simply let the weakCAS fail.
That's correct. On x86 we don't have any mechanism to implement a
weakCAS, so we just go with a strong one. On AArch64 we can use a
custom version which implements the correct semantics.
Andrew.
More information about the shenandoah-dev
mailing list