[jdk15u-dev] RFR: 8186670: Implement _onSpinWait() intrinsic for AArch64
Andrew Haley
aph at openjdk.java.net
Fri Feb 25 11:13:48 UTC 2022
On Wed, 23 Feb 2022 15:43:41 GMT, Evgeny Astigeevich <duke at openjdk.java.net> wrote:
> A backport of a configurable implementation of _onSpinWait() intrinsic to achieve parity with x86 which has it implemented.
> The risk of changes is low. By default it is off.
> Tested for fastdebug and release builds:
>
> - `gtest`: Passed
> - `tier1`...`tier3`: Passed except [JDK-8261534](https://bugs.openjdk.java.net/browse/JDK-8261534) and [JDK-8277488](https://bugs.openjdk.java.net/browse/JDK-8277488)
> - `hotspot/jtreg/compiler/onSpinWait`: Passed
>
> Applying the patch had issues to find proper positions. No code changes are needed after repositioning.
> Changes to `globals_aarch64.hpp` needed the new added options definitions to be converted from the new format to the old one. `vm.flagless` was removed from the new tests.
> Changes to `vm_version_aarch64.cpp`, instantiation of `SpinWait`, use C++11 syntax. They needed to be changed to C++03 syntax.
I'm not sure about this one. With OnSpinWaitInst=isb, ThreadOnSpinWaitProducerConsumer gets better but ThreadOnSpinWaitSharedCounter gets worse. So there are cases where it's worth using, but does this patch meet the "enhancement that provides substantial benefit to OpenJDK 11u users and it is of low risk" requirement? I guess as long as the default for all platforms stays at "off" it won't cause any regressions.
Do you know of any applications that substantially benefit?
-------------
PR: https://git.openjdk.java.net/jdk15u-dev/pull/181
More information about the jdk-updates-dev
mailing list