RFR: 8322535: Change default AArch64 SpinPause instruction
    Fredrik Bredberg 
    fbredberg at openjdk.org
       
    Tue Jan 16 10:03:29 UTC 2024
    
    
  
The Java options OnSpinWaitInst lets you choose which AArch64 instruction should be used in `SpinPause()`. Valid values are "none", "nop", "isb" and "yield". Today the default value for OnSpinWaitInst is unfortunately "none".
However some CPUs changes the default SpinPause instruction to something better if the user hasn't used the OnSpinWaitInst option. For instance if you run a Neoverse N1, N2, V1 or V2, the default SpinPause instruction will be changed to "isb". After doing some measurements on Apple's M1-M3 CPUs it also seems like "isb" is the best yielding instruction on on those CPUs.
This PR changes the default SpinPause instruction to "yield" on all AArch64 platforms except on Apple's M1, M2 and M3 CPUs on which the default value will be "isb".
Tested tier1-tier7 successfully on linux-aarch64 and macosx-aarch64.
-------------
Commit messages:
 - 8322535: Change default AArch64 SpinPause instruction
Changes: https://git.openjdk.org/jdk/pull/17430/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17430&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8322535
  Stats: 20 lines in 2 files changed: 17 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/17430.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17430/head:pull/17430
PR: https://git.openjdk.org/jdk/pull/17430
    
    
More information about the hotspot-dev
mailing list