RFC: AArch64: Implementing spin pauses with ISB

Andrew Haley aph-open at littlepinkcloud.com
Wed Aug 18 09:18:27 UTC 2021


On 8/17/21 6:13 PM, Astigeevich, Evgeny wrote:
> I am not aware of anyone tried WFE. IMHO WFE might be too complicated. It needs wakeup events.
> Armv8.7-A has WFE/WFI with timeouts. See https://static.linaro.org/connect/lvc20/presentations/LVC20-214-0.pdf  slide 10. They might be worth to try when WFET/WFIT appear in hardware.

AFAIK it needs no more than a write to the location being monitored.

"The following are WFE wake-up events:

   ... An event caused by the clearing of the global monitor for the PE."

That looks like exactly the right thing, assuming that the wait state doesn't
take too long to enter and exit. We'd have to wait on whatever location the
code was spinning on. Any write to that location by any PE would clear the
global monitor, I think.

Anyway, OK, we could do this, if we at least had the opportunity to switch
to PAUSE with an command-line option. And be aware that at any time any
manufacturer could mess this up, so it's dangerous to have it on by default.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the hotspot-dev mailing list