Re: Requiring 32 bit atomics

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Requiring 32 bit atomics
Date: 2022-10-28 00:01:26
Message-ID: 20221028000126.udcofvpnquh35rau@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zheng Li 2022-10-28 00:20:42 Re: Support logical replication of DDLs
Previous Message Tom Lane 2022-10-27 23:46:42 Re: Requiring 32 bit atomics