pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Improve 64bit atomics support.
Date: Fri, 07 Apr 2017 21:50:58 +0000
Message-ID: <E1cwbmU-0004SM-Ki@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e8fdbd58fe564a29977f4331cd26f9697d76fc40

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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (6+ messages)  latest in thread

Message-ID: <E1cwbmU-0004SM-Ki@gemulon.postgresql.org>
Permalink:  ../E1cwbmU-0004SM-Ki@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1cwbmU-0004SM-Ki@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: Improve 64bit atomics support.
  In-Reply-To: <E1cwbmU-0004SM-Ki@gemulon.postgresql.org>
  References: <E1cwbmU-0004SM-Ki@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox