[jdk15u-dev] RFR: 8186670: Implement _onSpinWait() intrinsic for AArch64
Andrew Haley
aph-open at littlepinkcloud.com
Fri Feb 25 13:20:40 UTC 2022
On 2/25/22 12:14, Evgeny Astigeevich wrote:
> On Fri, 25 Feb 2022 10:24:08 GMT, Andrew Haley <aph at openjdk.org> wrote:
>
>> 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?
>
> This is for 15u not for 11u.
Sure, OK. I'm thinking ahead.
>> Do you know of any applications that substantially benefit?
>
> Yes, we have services which got improvements. Also 15u version of `java.util.concurrent.SynchronousQueue` uses `Thread.onSpinWait`. A SynchronousQueue microbenchmark (see it in https://bugs.openjdk.java.net/browse/JDK-8267502) got the following geomean ops/s when ran on 2 CPUs 60 times:
> - No intrinsic implementation: 226,732.8 ops/s
> - One ISB implementation: 1,996,916.3 ops/s
>
> The difference is 8.8x.
Interesting, so I guess that's much more dramatic than anything we have in
the OpenJDK benchmarks. Maybe we want a JMH version of that.
Do you think that onSpinWait() = ISB would help with 8267502?
More information about the jdk-updates-dev
mailing list