Re: optimize atomic exchanges

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Date: 2023-12-04T21:08:57Z
Lists: pgsql-hackers

Attachments

On Mon, Dec 04, 2023 at 12:18:05PM -0600, Nathan Bossart wrote:
> 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?

Concretely, like this.

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

Commits

  1. Optimize pg_atomic_exchange_u32 and pg_atomic_exchange_u64.