Re: use a non-locking initial test in TAS_SPIN on AArch64
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org, dipiets@amazon.com
Date: 2025-01-09T18:15:59Z
Lists: pgsql-hackers
On Wed, Jan 08, 2025 at 06:07:44PM -0500, Tom Lane wrote: > Nathan Bossart <nathandbossart@gmail.com> writes: >> AFAICT TAS_SPIN() is only used for s_lock(), which doesn't appear to be >> used by LWLocks. But I did retry my test from upthread without >> pg_stat_statements and was surprised to find a reproducible 4-6% >> regression. > > On what hardware? This was on a c8g.24xlarge (Neoverse-V2, Armv9.0-a) [0]. > I just spent an hour beating on my M4 Pro (the 14-core variant) > and could not detect any outside-the-noise effect of this patch, > with or without pg_stat_statements loaded. There does seem to be > a small fraction-of-a-percent-ish benefit. But the run-to-run > variation with 60-second "pgbench -S" tests is a couple of percent, > so I can't say that that's real. > > I do feel pretty sure that the patch doesn't hurt on this > class of hardware. Great. This matches what I saw on an M3. [0] https://github.com/aws/aws-graviton-getting-started/blob/main/README.md#building-for-graviton -- nathan
Commits
-
Use a non-locking initial test in TAS_SPIN on AArch64.
- 3d0b4b106801 18.0 landed