Remove configurability of PPC spinlock assembly code

Enterprise / PostgreSQL - Tom Lane [] - 13 August 2022 17:36 UTC

Assume that we can use LWARX hint flags and the LWSYNC instruction on any PPC machine. The check on the assembler's behavior was only needed for Apple's old assembler, which is no longer of interest now that we've de-supported all PPC-era versions of macOS (thanks to them not having clock_gettime()). Also, given an up-to-date assembler these instructions work even on Apple's old hardware. It seems quite unlikely that anyone would be interested in running current Postgres on PPC hardware that's so old as to not have these instructions.

Hence, rip out associated configure test and manual configuration options, and just use the modernized instructions all the time. Also, update atomics/arch-ppc.h to use these instructions as well. (It was already using LWSYNC unconditionally in another place, providing further proof that nobody is using PG on hardware old enough to have a problem with that.)


8ded65682b Remove configurability of PPC spinlock assembly code.
configure | 34 +------------------------------ | 13 +-----------
src/include/ | 3 ---
src/include/pg_config_manual.h | 26 ------------------------
src/include/port/atomics/arch-ppc.h | 40 ++++++++++++++++++-------------------
src/include/storage/s_lock.h | 24 ++++------------------
src/tools/msvc/ | 1 -
7 files changed, 26 insertions(+), 115 deletions(-)


  • Share