Thread: Re: use a non-locking initial test in TAS_SPIN on AArch64

Re: use a non-locking initial test in TAS_SPIN on AArch64

From
Jingtang Zhang
Date:
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.


Re: use a non-locking initial test in TAS_SPIN on AArch64

From
Nathan Bossart
Date:
On Wed, Oct 23, 2024 at 11:01:05AM +0800, Jingtang Zhang wrote:
> 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.

This is on a c8g.24xlarge, which is using Neoverse-V2 and Armv9.0-a [0].

> I'm willing to test it on Alibaba Cloud Yitian 710 if I have time.

That would be great.  I have a couple of Apple M-series machines I can
test, too.

[0] https://github.com/aws/aws-graviton-getting-started/blob/main/README.md#building-for-graviton
-- 
nathan



Re: use a non-locking initial test in TAS_SPIN on AArch64

From
Nathan Bossart
Date:
On Wed, Oct 23, 2024 at 09:46:56AM -0500, Nathan Bossart wrote:
> I have a couple of Apple M-series machines I can test, too.

After some preliminary tests on an M3, I'm not seeing any gains outside the
noise range.  That's not too surprising because it's likely more difficult
to create a lot of spinlock contention on these smaller machines.  But, at
the very least, I'm not seeing a regression.

-- 
nathan