RFC: AArch64: Implementing spin pauses with ISB

Andrew Haley aph-open at littlepinkcloud.com
Tue Aug 17 08:23:50 UTC 2021


On 8/16/21 11:39 PM, Stuart Monteith wrote:

> 	This is interesting, and thank you for bringing it up for discussion here. The ISB instruction wasn't intended to be 
> used for that purpose, so while you can measure a benefit for now, there is no guarantee that it would continue to be 
> beneficial in the future. I hate to suggest adding more flags, but we ought to consider adding one to disable the ISB 
> instruction in the spins. The counter argument is of course that we'd update the implementation as new cores come out.

Indeed. It all sounds a bit like witchcraft to me. I guess that any instruction
which caused a significant stall would reduce contention, but it'd take some
experiments to confirm that.

Evgeny, did anyone try waiting on the monitor location with a WFE? That'd at
least be using an instruction as intended, and would certainly reduce contention,
but WFE might be too drastic for a brief spin lock.

-- 
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