Improve 64bit atomics support.
Andres Freund <andres@anarazel.de>
Improve 64bit atomics support. When adding atomics back in b64d92f1a, I added 64bit support as optional; there wasn't yet a direct user in sight. That turned out to be a bit short-sighted, it'd already have been useful a number of times. Add a fallback implementation of 64bit atomics, just like the one we have for 32bit atomics. Additionally optimize reads/writes to 64bit on a number of platforms where aligned writes of that size are atomic. This can now be tested with PG_HAVE_8BYTE_SINGLE_COPY_ATOMICITY. Author: Andres Freund Reviewed-By: Amit Kapila Discussion: https://postgr.es/m/20160330230914.GH13305@awork2.anarazel.de
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/port/atomics.c | modified | +64 −1 |
| src/include/port/atomics/arch-ia64.h | modified | +3 −0 |
| src/include/port/atomics/arch-ppc.h | modified | +3 −0 |
| src/include/port/atomics/arch-x86.h | modified | +10 −0 |
| src/include/port/atomics/fallback.h | modified | +33 −0 |
| src/include/port/atomics/generic.h | modified | +18 −4 |
| src/include/port/atomics.h | modified | +5 −8 |
| src/test/regress/regress.c | modified | +0 −4 |
Discussion
- Speed up Clog Access by increasing CLOG buffers 248 messages · 2015-09-01 → 2017-09-02