Re: Remove last traces of HPPA support
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Noah Misch <noah@leadboat.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org
Date: 2024-07-29T21:50:08Z
Lists: pgsql-hackers
Attachments
- v2-0001-Remove-disable-spinlocks.patch (text/x-patch) patch v2-0001
- v2-0002-Remove-disable-atomics-require-32-bit-atomics.patch (text/x-patch) patch v2-0002
- v2-0003-Require-compiler-barrier-support.patch (text/x-patch) patch v2-0003
- v2-0004-Require-memory-barrier-support.patch (text/x-patch) patch v2-0004
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
Commits
-
Require memory barrier support.
- 83aadbeb96f0 18.0 landed
-
Require compiler barrier support.
- a011dc399cc8 18.0 landed
-
Remove --disable-atomics, require 32 bit atomics.
- 813852613629 18.0 landed
-
Remove --disable-spinlocks.
- e25626677f80 18.0 landed
-
Remove support for HPPA (a/k/a PA-RISC) architecture.
- edadeb0710e8 18.0 landed
-
Add a basic atomic ops API abstracting away platform/architecture details.
- b64d92f1a560 9.5.0 cited