pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Require memory barrier support.
Date: Tue, 30 Jul 2024 11:03:37 +0000
Message-ID: <E1sYkdl-001sbu-ID@gemulon.postgresql.org> (raw)

Require memory barrier support.

Previously we had a fallback implementation that made a harmless system
call, based on the assumption that system calls must contain a memory
barrier.  That shouldn't be reached on any current system, and it seems
highly likely that we can easily find out how to request explicit memory
barriers, if we've already had to find out how to do atomics on a
hypothetical new system.

Removed comments and a function name referred to a spinlock used for
fallback memory barriers, but that changed in 1b468a13, which left some
misleading words behind in a few places.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Suggested-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/721bf39a-ed8a-44b0-8b8e-be3bd81db748%40technowledgy.de
Discussion: https://postgr.es/m/3351991.1697728588%40sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/83aadbeb96f019fff88e6a06615fe0a86c6956ca

Modified Files
--------------
src/backend/port/atomics.c          | 23 -----------------------
src/include/port/atomics.h          |  4 ++++
src/include/port/atomics/fallback.h | 16 ----------------
src/include/port/atomics/generic.h  | 10 ----------
4 files changed, 4 insertions(+), 49 deletions(-)



Message-ID: <E1sYkdl-001sbu-ID@gemulon.postgresql.org>
Permalink:  ../E1sYkdl-001sbu-ID@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sYkdl-001sbu-ID@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Require memory barrier support.
  In-Reply-To: <E1sYkdl-001sbu-ID@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox