Re: Improving spin-lock implementation on ARM.

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Krunal Bauskar <krunalbauskar(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Improving spin-lock implementation on ARM.
Date: 2020-11-29 17:07:58
Message-ID: CAPpHfdumR0BP-kN_+c_OOm3MVNEtCkXtuO4mZJ+G8N1rpj8v1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 26, 2020 at 7:35 AM Krunal Bauskar <krunalbauskar(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-11-29 17:10:21 Re: Printing LSN made easy
Previous Message Alexander Korotkov 2020-11-29 16:53:44 Re: Improving spin-lock implementation on ARM.