JDK-8292591 has introduced System Memory Barriers for linux and Windows as experimental feature (released with JDK20). It has been extended by JDK-8293922 and tested on x86_64, aarch64 and PPC64le since September 2022 and there are no known issues.
Explanation and performance results were reported here: https://github.com/openjdk/jdk/pull/10123#issuecomment-1235123012
I originally wanted to enable the feature by default for JDK21, but startup performance is impacted and some benchmarks on some platforms as well (see PR below). So, I only want to make it available as product flag, now.
JFR users who use a very high sampling rate may notice a performance penalty of the System Memory Barrier calls. The feature can get switched off in this case by -XX:-UseSystemMemoryBarrier.
Note: The feature requires at least Linux 4.14. The flag needs to be off for older versions.