Use a non-locking initial test in TAS_SPIN on AArch64.
authorNathan Bossart <nathan@postgresql.org>
Fri, 10 Jan 2025 19:18:04 +0000 (13:18 -0600)
committerNathan Bossart <nathan@postgresql.org>
Fri, 10 Jan 2025 19:18:04 +0000 (13:18 -0600)
commit3d0b4b1068018f624d5ef7c9f90b536ed58345b5
treed6a07feca10bd4a18d18363204e33309ba8f8b6e
parent28e7a9968e183a6b8dddaff5b513b0656ba349aa
Use a non-locking initial test in TAS_SPIN on AArch64.

Our testing showed that this is helpful at sufficiently high
contention levels and doesn't hurt performance on smaller machines.
The new TAS_SPIN macro for AArch64 is identical to the ones added
for PPC and x86_64 (see commits bc2a050d40 and b03d196be0).

Reported-by: Salvatore Dipietro
Reviewed-by: Jingtang Zhang, Andres Freund
Tested-by: Tom Lane
Discussion: https://postgr.es/m/ZxgDEb_VpWyNZKB_%40nathan
src/include/storage/s_lock.h