pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: Peter Geoghegan <pg@heroku.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Ants Aasma <ants@cybertec.at>
Subject: Re: better atomics - v0.5
Date: Mon, 30 Jun 2014 13:45:52 -0400
Message-ID: <12903.1404150352@sss.pgh.pa.us> (raw )
In-Reply-To: <CA+TgmobLpKZU0TWOmg8kGFBjhszxiexQpDEmcUBm10-1eLZgUg@mail.gmail.com >
References: <CA+TgmoZShVVqjaKUL6P3kDvZVPibtgkzoti3M+Fvvjg5V+XJ0A@mail.gmail.com >
<20140625203635.GJ24114@awork2.anarazel.de >
<CA+TgmoY4OqKa9=G+5F0s0gPTpOB4cz=Mts34jrdf8399MWGcqw@mail.gmail.com >
<20140626102006.GB1926@awork2.anarazel.de >
<CA+TgmoYUQ17UFfG3S-zctOdT9ba3cuW-J7TmfzKPF_N=nkqCEw@mail.gmail.com >
<54412.1403808435@sss.pgh.pa.us >
<20140626190405.GA21422@awork2.anarazel.de >
<CA+TgmoZjAiqjg40364uSkyh8c7iib_VbvsTDuwG2d-rX8p1BeA@mail.gmail.com >
<20140627180033.GF18288@awork2.anarazel.de >
<CA+TgmoZBnU7UcDRw1_Mgu3nW3RQ1OeSGecO_--Br7f5gz0GUrA@mail.gmail.com >
<20140628082559.GB6450@awork2.anarazel.de >
<CA+TgmoYd1BKsbvqPuCQuQb6+9znVLgjhJTvLo9tS=FuY1jXw0Q@mail.gmail.com >
<11914.1404147250@sss.pgh.pa.us >
<CA+TgmobLpKZU0TWOmg8kGFBjhszxiexQpDEmcUBm10-1eLZgUg@mail.gmail.com >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Robert Haas <robertmhaas@gmail.com> writes:
> I'm personally not convinced that we're approaching this topic in the
> right way. I'm not convinced that it's at all reasonable to try to
> emulate atomics on platforms that don't have them. I would punt the
> problem into the next layer and force things like lwlock.c to have
> fallback implementations at that level that don't require atomics, and
> remove those fallback implementations if and when we move the
> goalposts so that all supported platforms must have working atomics
> implementations. People who write code that uses atomics are not
> likely to think about how those algorithms will actually perform when
> those atomics are merely emulated, and I suspect that means that in
> practice platforms that have only emulated atomics are going to
> regress significantly vs. the status quo today.
I think this is a valid objection, and I for one am not prepared to
say that we no longer care about platforms that don't have atomic ops
(especially not if it's not a *very small* set of atomic ops).
Also, just because a platform claims to have atomic ops doesn't mean that
those ops perform well. If there's a kernel trap involved, they don't,
at least not for our purposes. We're only going to be bothering with
installing atomic-op code in places that are contention bottlenecks
for us already, so we are not going to be happy with the results for any
atomic-op implementation that's not industrial strength. This is one
reason why I'm extremely suspicious of depending on gcc's intrinsics for
this; that will not make the issue go away, only make it beyond our
power to control.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
view thread (58+ messages) latest in thread
Message-ID: <12903.1404150352@sss.pgh.pa.us>
Permalink: ../12903.1404150352@sss.pgh.pa.us/
Also on: postgresql.org/message-id/12903.1404150352@sss.pgh.pa.us
copy link · copy postgr.es
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, andres@2ndquadrant.com, pg@heroku.com, ants@cybertec.at
Subject: Re: better atomics - v0.5
In-Reply-To: <12903.1404150352@sss.pgh.pa.us>
* 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