pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: optimize atomic exchanges
Date: Mon, 4 Dec 2023 12:18:05 -0600
Message-ID: <20231204181805.GA2148732@nathanxps13> (raw)
In-Reply-To: <20231201043522.GB1577008@nathanxps13>
References: <20231129212905.GA1258737@nathanxps13>
	<20231201031815.GA1519459@nathanxps13>
	<20231201035627.7xke2qvec6p5lihy@awork3.anarazel.de>
	<20231201043522.GB1577008@nathanxps13>

On Thu, Nov 30, 2023 at 10:35:22PM -0600, Nathan Bossart wrote:
> One thing on my mind is whether we should bother with the inline assembly
> versions.  It looks like gcc has had __atomic since 4.7.0 (2012), so I'm
> not sure we gain much from them.  OTOH they are pretty simple and seem
> unlikely to cause too much trouble.

Barring objections or additional feedback, I think I'm inclined to press
forward with this one and commit it in the next week or two.  I'm currently
planning to keep the inline assembly, but I'm considering removing the
configuration checks for __atomic_exchange_n() if the availability of
__atomic_compare_exchange_n() seems like a reliable indicator of its
presence.  Thoughts?

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (8+ messages)  latest in thread

Message-ID: <20231204181805.GA2148732@nathanxps13>
Permalink:  ../20231204181805.GA2148732@nathanxps13/
Also on:    postgresql.org/message-id/20231204181805.GA2148732@nathanxps13

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, andres@anarazel.de
  Subject: Re: optimize atomic exchanges
  In-Reply-To: <20231204181805.GA2148732@nathanxps13>
  References: <20231129212905.GA1258737@nathanxps13> <20231201031815.GA1519459@nathanxps13> <20231201035627.7xke2qvec6p5lihy@awork3.anarazel.de> <20231201043522.GB1577008@nathanxps13> <20231204181805.GA2148732@nathanxps13>

* 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