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

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Salvatore Dipietro <dipiets(at)amazon(dot)it>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, mrdrivingduck(at)gmail(dot)com, andres(at)anarazel(dot)de, tgl(at)sss(dot)pgh(dot)pa(dot)us, dipietro(dot)salvatore(at)gmail(dot)com
Subject: Re: use a non-locking initial test in TAS_SPIN on AArch64
Date: 2026-09-15 14:51:37
Message-ID: aqlbeci-pDwk9dQX@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 15, 2026 at 11:46:23AM +0000, Salvatore Dipietro wrote:
> I'd like to propose backporting this commit 3d0b4b1068 ("Use a
> non-locking initial test in TAS_SPIN on AArch64.", Nathan Bossart,
> 2025-01-10), which first shipped in PostgreSQL 18, to the supported
> back branches: REL_17_STABLE, REL_16_STABLE and REL_15_STABLE.

I think that's fine. It was likely an oversight when AArch64 support was
first added to this file, anyway. We could also back-patch to v14, but
that would look a little different since it is missing commit a82a5eee31
("Use ISB as a spin-delay instruction on ARM64"). Since v14 is set to go
out-of-support in a couple months, I'd probably just stop at v15 and call
it a day, though.

> With huge_pages=on both effects largely disappear: huge pages mask the
> paging defect, and TTAS is neutral.
>
> The change is a one-line, so a backport looks low-risk and would spare
> pre-18 AArch64 users a severe regression as PREEMPT_LAZY kernels ship.

I'm curious why you are testing without huge pages enabled. My
understanding is that any serious workload on the kinds of machines you are
using for your benchmarks would use them.

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2026-09-15 15:05:22 Re: Return pg_control from pg_backup_stop().
Previous Message Nathan Bossart 2026-09-15 14:38:57 Re: add list of major features to the v19 release notes