Re: Requiring 32 bit atomics - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Requiring 32 bit atomics
Date
Msg-id 20221028000126.udcofvpnquh35rau@awork3.anarazel.de
Whole thread Raw
In response to Re: Requiring 32 bit atomics  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 2022-10-27 19:44:13 -0400, Tom Lane wrote:
> Turns out they have a pretty cute workaround for it, on HPPA and a couple of
> other atomics-less arches they still support.  They've written short
> sequences that have the effect of CAS and are designed to store to memory
> only at the end.  To make them atomic, libc asks the kernel "pretty please,
> if you happen to notice that I've been interrupted in the PC range from here
> to here, would you reset the PC to the start of that before returning?".

That sounds roughly like restartable sequences in the linux world - a pretty
cool feature.  It's too bad that it's not yet available everywhere, it does
make some things a lot easier [to make performant].


> Anyway, I think the big picture here is that nowadays we could
> assume that the platform offers this feature.

Agreed.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Requiring 32 bit atomics
Next
From: Zheng Li
Date:
Subject: Re: Support logical replication of DDLs