8230392: Define AArch64 as MULTI_COPY_ATOMIC

David Holmes david.holmes at oracle.com
Tue Jan 21 22:58:21 UTC 2020


Andrew,

On 22/01/2020 3:12 am, Andrew Haley wrote:
> http://cr.openjdk.java.net/~aph/8230392/
> 
> I tested this in a bunch of ways, including bootstrapping and jtreg, but
> I'm not sure anything really stress tests this. I expect it'll be fine.
> 
> OK to commit?

You obviously missed my response on the other email thread regarding the 
taskQueue code.

> "acquire" isn't used to order loads it is used to pair with a "release" associated with the store of the variable now being loaded.
> 
> If this is the code referred to:
> 
>   Age oldAge = _age.get();
>   // Architectures with weak memory model require a barrier here
>   // to guarantee that bottom is not older than age,
>   // which is crucial for the correctness of the algorithm.
> #ifndef CPU_MULTI_COPY_ATOMIC
>   OrderAccess::fence();
> #endif
>   uint localBot = Atomic::load_acquire(&_bottom);
> 
> then I think there is an assumption (perhaps incorrect) that the load_acquire will prevent reordering as well as performing the necessary "acquire" semantics. If the load_acquire doesn't prevent reordering then surely a loadload() barrier is what is needed.

Cheers,
David
-----





More information about the hotspot-dev mailing list