RFR: [NOT TO MERGE YET] 8258604: Use 'isb' instruction in SpinPause on linux-aarch64 [v2]

Evgeny Astigeevich github.com+42899633+eastig at openjdk.java.net
Fri Oct 1 18:43:31 UTC 2021


On Fri, 1 Oct 2021 17:46:19 GMT, Stuart Monteith <smonteith at openjdk.org> wrote:

>> Evgeny Astigeevich has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8258604: Use 'isb' instruction in SpinPause on linux-aarch64
>>   
>>   Fix: SpinPause() should return 1 if it executes code.
>
> src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp line 387:
> 
>> 385:     // ISB creates a small delay without consuming ALU resources.
>> 386:     // This allows it to act as x86 PAUSE.
>> 387:     __asm volatile("isb");
> 
> I hadn't realised this was unconditional. Similar to my comment on the onSpinWait patch, while the ISB instruction happens to work for you just now on the platforms you have tested, there is no guarantee that it will continue to do so in future processors. 
> Could this be made optional? This is awkward, as it is C++ code, but it may have to be a build configuration option.

Hi Stuart,
Yes, I'll be updating it to support different implementations.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5112


More information about the hotspot-runtime-dev mailing list