Re: optimize atomic exchanges

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2023-12-15T12:56:27Z
Lists: pgsql-hackers
Hi,

On 2023-12-04 15:08:57 -0600, Nathan Bossart wrote:
> 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?

I don't think we need the inline asm. Otherwise looks good.

Greetings,

Andres Freund



Commits

  1. Optimize pg_atomic_exchange_u32 and pg_atomic_exchange_u64.