For what it's worth, I tried to build haproxy on Apple M1.
It builds OK but at run, it's stuck in the initial pool_flush, hogging 100% CPU.

the assembly part of __ha_cas_dw for __aarch64__ seems to be ignored.


-- 
Ionel

----- Mail original -----
De: "Willy Tarreau" <w...@1wt.eu>
À: "David CARLIER" <devne...@gmail.com>
Cc: "haproxy" <haproxy@formilux.org>
Envoyé: Lundi 21 Décembre 2020 11:16:47
Objet: [*EXT*] Re: Quick question on atomics on ARM

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
--
232 avenue Napoleon BONAPARTE 92500 RUEIL MALMAISON
Capital EUR 219 300,00 - RCS Nanterre B 408 832 301 - TVA FR 09 408 832 301


Reply via email to