Re: use a non-locking initial test in TAS_SPIN on AArch64 - Mailing list pgsql-hackers

From Jingtang Zhang
Subject Re: use a non-locking initial test in TAS_SPIN on AArch64
Date
Msg-id CAPsk3_Bx5PhS9A+NH7SO2K-bwrZS7q4i-WTy1Bf98j0CAEqa=g@mail.gmail.com
Whole thread Raw
Responses Re: use a non-locking initial test in TAS_SPIN on AArch64
List pgsql-hackers
Hi~

Upon closer inspection, I noticed that we don't implement a custom
TAS_SPIN() for this architecture, so I quickly hacked together the attached
patch and ran a couple of benchmarks that stressed the spinlock code.  I
found no discussion about TAS_SPIN() on ARM in the archives, but I did
notice that the initial AArch64 support was added [0] before x86_64 started
using a non-locking test [1].
It reminds me of a discussion about improving spinlock performance on ARM
in 2020 [0], though the discussion is about CAS and TAS, not TAS_SPIN() itself.
 
    tps = 74135.100891 (without initial connection time)
    tps = 549462.785554 (without initial connection time)
The result looks great, but the discussion in [0] shows that the result may
vary among different ARM chips. Could you provide the chip model of this
test? So that we can do a cross validation of this patch. Not sure if compiler
version is necessary too. I'm willing to test it on Alibaba Cloud Yitian 710
if I have time.


pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Inconsistent use of relpages = -1
Next
From: Amit Kapila
Date:
Subject: Re: Make default subscription streaming option as Parallel