From: Andres Freund <andres@anarazel.de>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Kevin Grittner <kgrittn@gmail.com>
Cc: Kevin Grittner <kgrittn@postgresql.org>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Date: Wed, 13 Apr 2016 08:38:07 -0700
Message-ID: <20160413153807.3ztdnh2ugu3xjzxc@alap3.anarazel.de> (raw)
In-Reply-To: <CA+TgmoZvDkuLsx0OiVnnihie66nQA3fbmwbEcrQ5HGUxpW+ngQ@mail.gmail.com>
References: <20160413025214.GA954515@alvherre.pgsql>
<20160413030530.dfldqhmtojo222c4@alap3.anarazel.de>
<CA+TgmoZqN0xevR+1pZ6j-99-ZCBoOphr-23tiREb+QW1Eu=KOA@mail.gmail.com>
<20591.1460555524@sss.pgh.pa.us>
<CA+TgmoY9VeZdTZkTp8SKoXPKKj0PGu2aKPt0dLTDDsgu+vm0yw@mail.gmail.com>
<21698.1460557237@sss.pgh.pa.us>
<CA+TgmoZYFZqLukuiRvz_izNPno+WqKVorcEvAi0jOSs0MsKhWA@mail.gmail.com>
<22526.1460558523@sss.pgh.pa.us>
<20160413151801.nafgcxlitagi6fec@alap3.anarazel.de>
<CA+TgmoZvDkuLsx0OiVnnihie66nQA3fbmwbEcrQ5HGUxpW+ngQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 2016-04-13 11:27:09 -0400, Robert Haas wrote:
> That page is sort of confusing, because it says that platform has
> those things but then says ***, which is footnoted to mean "linux
> kernel emulation available", but it's not too clear whether that
> applies to all atomics or just 8-byte atomics. The operator
> precedence of / (used as a separator) vs. footnotes is not stated.
/ has a higher precedence than footnotes. Not sure how to make that
easily clear. I'm not exactly a mediawiki expert.
> It's also not clear what "linux kernel emulation available" actually
> means. Should we think of those things being fast, or slow?
Slow. It means that the compiler generates a syscall to perform the
atomic. The syscall disables preemption, then performs the actual math,
re-enables preemption, and returns. That's a lot more expensive than a
spinlock. There's
/*
* 64 bit atomics on arm are implemented using kernel fallbacks and might be
* slow, so disable entirely for now.
* XXX: We might want to change that at some point for AARCH64
*/
#define PG_DISABLE_64_BIT_ATOMICS
for that reason (in the current tree, not patch).
The whole fallback facility exists to make it easier to port software to
arm; but I wouldn't want to rely on it if not necessary.
Greetings,
Andres Freund
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, noah@leadboat.com, kgrittn@gmail.com, kgrittn@postgresql.org, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
In-Reply-To: <20160413153807.3ztdnh2ugu3xjzxc@alap3.anarazel.de>
References: <20160413025214.GA954515@alvherre.pgsql> <20160413030530.dfldqhmtojo222c4@alap3.anarazel.de> <CA+TgmoZqN0xevR+1pZ6j-99-ZCBoOphr-23tiREb+QW1Eu=KOA@mail.gmail.com> <20591.1460555524@sss.pgh.pa.us> <CA+TgmoY9VeZdTZkTp8SKoXPKKj0PGu2aKPt0dLTDDsgu+vm0yw@mail.gmail.com> <21698.1460557237@sss.pgh.pa.us> <CA+TgmoZYFZqLukuiRvz_izNPno+WqKVorcEvAi0jOSs0MsKhWA@mail.gmail.com> <22526.1460558523@sss.pgh.pa.us> <20160413151801.nafgcxlitagi6fec@alap3.anarazel.de> <CA+TgmoZvDkuLsx0OiVnnihie66nQA3fbmwbEcrQ5HGUxpW+ngQ@mail.gmail.com> <20160413153807.3ztdnh2ugu3xjzxc@alap3.anarazel.de>
* 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