[aarch64-port-dev ] Question about JVM option "-XX:+UseBarriersForVolatile" usage in aarch64.
Nick Gasson
nick.gasson at arm.com
Fri Apr 3 02:03:30 UTC 2020
On 04/02/20 21:22 pm, Andrew Dinn wrote:
> One reason for having this switch was to provide a comparator for our
> scheme to implement the Java volatile accesses using ldar/stlr. That
> translation scheme avoids a dmb after the stlr allowing the value being
> written to be committed lazily while still providing the critical
> guarantee that prior writes are committed before it gets committed. The
> switch ensures we can fall back to a 'reference' implementation based on
> dmbs that, amongst other things, enforces immediate commit of the
> volatile write after commit of its predecessors.
>
> By removing support we lose the ability to test cases where
> synchronization errors occur with our scheme by switching to the
> 'standard' model. That may still be useful for finding bugs (current or
> newly injected) in our translation and, indeed, in new HW.
OK, but keeping it is not without cost. If UseBarriersForVolatile is to
have value as a reference implementation we need to expend effort to
test it and fix any bugs that arise from changes to other parts of the
code (see Xiaohong's original mail).
Thanks,
Nick
More information about the aarch64-port-dev
mailing list