JDK-8243456 : AArch64: Obsolete UseBarriersForVolatile option
  • Type: CSR
  • Component: hotspot
  • Sub-Component: compiler
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 15
  • Submitted: 2020-04-23
  • Updated: 2020-05-26
  • Resolved: 2020-05-26
Related Reports
CSR :  
Description
Summary
-------

Obsolete the VM product option `UseBarriersForVolatile`

Problem
-------

Running application with option "-XX:+UseBarriersForVolatile" might have memory consistent issue like what mentioned in https://bugs.openjdk.java.net/browse/JDK-8241137.  Besides it adds complexity to the volatile access implementation, and each usage of it needs to take more consideration of the memory consistent and tests. Since `ldar/stlr` can work well stably for volatile access, and so does `ldaxr/stlxr` for unsafe atomic operations, we'd better simplify things by removing this flag and the alternative implementation for volatile memory access.

Solution
--------

Obsolete the option and remove its usages in hotspot. 

Here is the discussion details about this flag:

http://mail.openjdk.java.net/pipermail/aarch64-port-dev/2020-March/008679.html

http://mail.openjdk.java.net/pipermail/aarch64-port-dev/2020-April/008706.html

Specification
-------------

Running `java` with option `-XX:+/-UseBarriersForVolatile` will no longer enable or disable the feature. Instead, it will print the usual obsolete option warning.


Comments
Moving to Approved.
26-05-2020

Thanks [~dholmes]! I'v marked it as Finalized. Thanks [~njian] for reviewing it!
22-05-2020

You need to get another engineer familiar with the proposed change to add themselves as a reviewer of the CSR (this is different to being an OpenJDK Reviewer - anyone with an OpenJDK user name can review a CSR.) To add themselves they need to "Edit" the CSR and scroll down to find the "Reviewed by" field. Once you have a reviewer please mark the CSR as Finalized and that will initiate the formal approval process. https://wiki.openjdk.java.net/display/csr/Main
22-05-2020

Hi [~dholmes], [~darcy], could you please help to take a look at this CSR? Here is the whole review thread: https://mail.openjdk.java.net/pipermail/aarch64-port-dev/2020-May/008894.html . Thank you!
22-05-2020