Re: optimize atomic exchanges

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: optimize atomic exchanges
Date: 2023-12-04 18:18:05
Message-ID: 20231204181805.GA2148732@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Davin Shearer 2023-12-04 18:37:06 Re: Emitting JSON to file using COPY TO
Previous Message Nathan Bossart 2023-12-04 17:58:11 Re: [PATCH] pg_convert improvement