[aarch64-port-dev ] Question about JVM option "-XX:+UseBarriersForVolatile" usage in aarch64.
Derek White
derekw at marvell.com
Mon Mar 30 15:09:05 UTC 2020
I think that was us (a bit before my time!). I'll double-check if that variant ever made it out...
- Derek
-----Original Message-----
From: aarch64-port-dev <aarch64-port-dev-bounces at openjdk.java.net> On Behalf Of Andrew Haley
Sent: Monday, March 30, 2020 6:44 AM
To: Nick Gasson <nick.gasson at arm.com>; aarch64-port-dev at openjdk.java.net
Cc: nd <nd at arm.com>; Xiaohong Gong <Xiaohong.Gong at arm.com>
Subject: Re: [aarch64-port-dev ] Question about JVM option "-XX:+UseBarriersForVolatile" usage in aarch64.
----------------------------------------------------------------------
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?
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.openjdk.java.
> net_pipermail_aarch64-2Dport-2Ddev_2015-2DMay_002315.html&d=DwIF-g&c=n
> KjWec2b6R0mOyPaz7xtfQ&r=gW0hANMfJfyELYt_X2mceubwzCNjT0vmaU97kngYUJk&m=
> dY4p0rOQhLXVe5xRZZlJ8GqVaDTZuBaQrt_nb8fBMKA&s=Uh_9IoXOwz8i9My-P1YeUPZm
> TkPUoQUenIVVvmoAIPw&e=
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://urldefense.proofpoint.com/v2/url?u=https-3A__www.redhat.com&d=DwIF-g&c=nKjWec2b6R0mOyPaz7xtfQ&r=gW0hANMfJfyELYt_X2mceubwzCNjT0vmaU97kngYUJk&m=dY4p0rOQhLXVe5xRZZlJ8GqVaDTZuBaQrt_nb8fBMKA&s=QPknQ3mZbTDhStrOxoM7UVflNe64wJgA1bw30-KXkjE&e= > https://urldefense.proofpoint.com/v2/url?u=https-3A__keybase.io_andrewhaley&d=DwIF-g&c=nKjWec2b6R0mOyPaz7xtfQ&r=gW0hANMfJfyELYt_X2mceubwzCNjT0vmaU97kngYUJk&m=dY4p0rOQhLXVe5xRZZlJ8GqVaDTZuBaQrt_nb8fBMKA&s=7liR09iA-HShWd3YYB5D3GPN35Ha9S_bwRIJX5VWpTI&e=
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the aarch64-port-dev
mailing list