Hi David,

On Tue, Dec 15, 2020 at 03:54:34PM +0000, David CARLIER wrote:
> Hi,
> 
> I started to look at Haproxy on ARM and stumbled across the
> implementation of cpu relax. While it is needed to have such
> instruction, I am however wondering if the yield instruction is not
> more appropriate than isb in this case ?

The use of ISB was suggested by one of the guys in charge of the AWS ARM
platform, and in tests it actually performed quite well. It will apparently
pause the current CPU for roughly 50 cycles. I have not tested the YIELD
instruction however. I suspect based on its description that it's more
tailored for some SMT environments (in case that happens one day), and
that on other ones it should essentially be a NOP. But this could be
tested.

Willy

Reply via email to