[aarch64-port-dev ] Question about JVM option "-XX:+UseBarriersForVolatile" usage in aarch64.
nick.gasson at arm.com
Thu Apr 2 01:48:40 UTC 2020
On 03/30/20 18:43 pm, Andrew Haley wrote:
> 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.
I checked glibc and the Linux kernel and couldn't find any workaround
like this. Presumably they'd both be affected.
I suggest if Derek can confirm that bug never made it into a production
part then we should completely remove UseBarriersForVolatile. Maybe with
a warning at startup if we detect that CPU variant. It adds a lot of
complexity to the volatile implementation for no clear benefit.
More information about the aarch64-port-dev