pgsql: Improve 64bit atomics support.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve 64bit atomics support.
Date: 2017-04-07 21:50:58
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

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

Author: Andres Freund
Reviewed-By: Amit Kapila



Modified Files
src/backend/port/atomics.c | 65 +++++++++++++++++++++++++++++++++++-
src/include/port/atomics.h | 13 +++-----
src/include/port/atomics/arch-ia64.h | 3 ++
src/include/port/atomics/arch-ppc.h | 3 ++
src/include/port/atomics/arch-x86.h | 10 ++++++
src/include/port/atomics/fallback.h | 33 ++++++++++++++++++
src/include/port/atomics/generic.h | 22 +++++++++---
src/test/regress/regress.c | 4 ---
8 files changed, 136 insertions(+), 17 deletions(-)


Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2017-04-07 22:09:12 pgsql: Reduce the number of pallocs() in BRIN
Previous Message Peter Eisentraut 2017-04-07 21:39:10 Re: pgsql: Identity columns

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-04-07 22:18:38 Re: Patch: Optimize memory allocation in function 'bringetbitmap'
Previous Message Kevin Grittner 2017-04-07 21:47:04 Re: recent deadlock regression test failures