Re: Improving spin-lock implementation on ARM. - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Improving spin-lock implementation on ARM.
Date
Msg-id CAPpHfdumR0BP-kN_+c_OOm3MVNEtCkXtuO4mZJ+G8N1rpj8v1A@mail.gmail.com
Whole thread Raw
In response to Improving spin-lock implementation on ARM.  (Krunal Bauskar <krunalbauskar@gmail.com>)
List pgsql-hackers
On Thu, Nov 26, 2020 at 7:35 AM Krunal Bauskar <krunalbauskar@gmail.com> wrote:
> * x86 uses optimized xchg operation.
>   ARM too started supporting it (using Large System Extension) with
>   ARM-v8.1 but since it not supported with ARM-v8, GCC default tends
>   to roll more generic load-store assembly code.
>
> * gcc-9.4+ onwards there is support for outline-atomics that could emit
>   both the variants of the code (load-store and cas/swp) and based on
>   underlying supported architecture proper variant it used but still a lot
>   of distros don't support GCC-9.4 as the default compiler.

I've checked that gcc 9.3 with "-march=armv8-a+lse" option uses LSE atomics...

------
Regards,
Alexander Korotkov



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Improving spin-lock implementation on ARM.
Next
From: Tom Lane
Date:
Subject: Re: Printing LSN made easy