Re: Broken atomics code on PPC with FreeBSD 10.3
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2016-12-30T16:14:24Z
Lists: pgsql-hackers
On December 30, 2016 4:48:22 PM GMT+01:00, Tom Lane <tgl@sss.pgh.pa.us> wrote: >and got no warnings and the attached output. I'm not very good at >reading >PPC assembler, but I think what is happening in the "char" case is that >gcc is trying to emulate a byte-wide operation using a word-wide one, >ie an lwarx/stwcx. loop. Hm. This seems to suggest a straight out code generation bug in that compiler, not a failure in intrinsic detection. I'll note that there's certainly ppc64 machine with that intrinsic working (tested that on the community hydra during atomics development). So either it's a bug specific to some compiler version, or 32bit ppc. I assume there's no trivial way to get a newer compiler on that machine? Andres -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Commits
-
Prefer int-wide pg_atomic_flag over char-wide when using gcc intrinsics.
- 698127a4a9bc 10.0 landed
- 6e5de703b6c7 9.6.2 landed
- 1ed8335ce045 9.5.6 landed
-
Allow Pin/UnpinBuffer to operate in a lockfree manner.
- 48354581a49c 9.6.0 cited
-
Avoid the use of a separate spinlock to protect a LWLock's wait queue.
- 008608b9d510 9.6.0 cited
-
Move buffer I/O and content LWLocks out of the main tranche.
- 6150a1b08a9f 9.6.0 cited
-
Improve spinlock performance for HP-UX, ia64, non-gcc.
- c01c25fbe525 9.2.0 cited