[aarch64-port-dev ] Question about JVM option "-XX:+UseBarriersForVolatile" usage in aarch64.

Andrew Haley aph at redhat.com
Mon Mar 30 10:43:57 UTC 2020


On 3/30/20 11:13 AM, Nick Gasson wrote:
> There is this one use in vm_version_aarch64.cpp:
>
>   if (FLAG_IS_DEFAULT(UseBarriersForVolatile)) {
>     UseBarriersForVolatile = (_features & CPU_DMB_ATOMICS) != 0;
>   }
>
> CPU_DMB_ATOMICS is set for one particular variant of one vendor's
> CPU. It came from "8079203: aarch64: need to cater for different partner
> implementations". But I can't find any explanation as to why it's
> required. Any ideas? CPU errata?
>
> http://mail.openjdk.java.net/pipermail/aarch64-port-dev/2015-May/002315.html

I remember an early stepping where STLR/LDAR weren't sequentially
consistent, so it was necessary to generate explicit DMBs. I doubt
that parts with this bug ever reached the market.

Having said that, maybe someone is still using one. It might be worth
correcting UseBarriersForVolatile and making the flag diagnostic only.
Having said that, the entire C library uses these instructions.
Opinions?

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the aarch64-port-dev mailing list