Re: Remove last traces of HPPA support - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Remove last traces of HPPA support
Date
Msg-id CA+hUKGKAf_i6w7hB_3pqZXQeqn+ixvY+CMps_n=mJ5HAatMjMw@mail.gmail.com
Whole thread Raw
In response to Re: Remove last traces of HPPA support  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Remove last traces of HPPA support
Re: Remove last traces of HPPA support
List pgsql-hackers
On Wed, Jul 3, 2024 at 8:09 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.munro@gmail.com> writes:
> > Here are some experimental patches to try out some ideas mentioned
> > upthread, that are approximately unlocked by that cleanup.
>
> FWIW, I'm good with getting rid of --disable-spinlocks and
> --disable-atomics.  That's a fair amount of code and needing to
> support it causes problems, as you say.  I am very much less
> excited about ripping out our spinlock and/or atomics code in favor
> of <stdatomic.h>; I just don't see the gain there, and I do see risk
> in ceding control of the semantics and performance of those
> primitives.

OK, <stdatomic.h> part on ice for now.  Here's an update of the rest,
this time also removing the barrier fallbacks as discussed in the LTO
thread[1].

I guess we should also consider reimplementing the spinlock on the
atomic API, but I can see that Andres is poking at spinlock code right
now so I'll keep out of his way...

Side issue: I noticed via CI failure when I tried to require
read/write barriers to be provided (a choice I backed out of), that on
MSVC we seem to be using the full memory barrier fallback for those.
Huh?  For x86, I think they should be using pg_compiler_barrier() (no
code gen, just prevent reordering), not pg_pg_memory_barrier(), no?
Perhaps I'm missing something but I suspect we might be failing to
include arch-x86.h on that compiler when we should... maybe it needs
to detect _M_AMD64 too?  For ARM, from a quick look, the only way to
reach real acquire/release barriers seems to be to use the C11
interface (which would also be fine on x86 where it should degrade to
a no-op compiler barrier or signal fence as the standard calls it),
but IIRC the Windows/ARM basics haven't gone in yet anyway.

[1]
https://www.postgresql.org/message-id/flat/721bf39a-ed8a-44b0-8b8e-be3bd81db748%40technowledgy.de#66ba381b05e8ee08b11503b846acc4a1

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: xid_wraparound tests intermittent failure.
Next
From: Dean Rasheed
Date:
Subject: Re: Optimize mul_var() for var1ndigits >= 8