RFR: AArch64: 8179954: AArch64: C1 and C2 volatile accesses are not sequentially consistent

Andrew Dinn adinn at redhat.com
Wed May 10 07:48:35 UTC 2017


On 09/05/17 18:18, Andrew Haley wrote:
> In C2 we use LDAR/STLR to handle volatile accesses, but in C1 and the
> interpreter we use separate DMB instructions and relaxed loads. When
> used together, these do not form a sequentially-consistent memory
> ordering. For example, if stores use STLR and loads use LDR;DMB a
> simple Dekker idiom will fail.

Oh, well caught!

> This is extremely hard to test because the loads and stores have to be
> in separately-compiled methods, but it is incorrect, and likely to
> fail in very weakly-ordered implementations.

Not to mention hard to debug ;-)

> Note: this is for JDK 9.
> 
>  http://cr.openjdk.java.net/~aph/8179954/

Yes, this patch looks good and really ought to go into jdk9.

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the hotspot-dev mailing list