Re: better atomics

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Ants Aasma <ants(at)cybertec(dot)at>
Subject: Re: better atomics
Date: 2013-10-28 20:22:36
Message-ID: 20131028202236.GG20248@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-10-28 16:06:47 -0400, Tom Lane wrote:
> Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:
> > On 28.10.2013 21:32, Andres Freund wrote:
> >> I think there are quite some algorithms relying on 16byte CAS, that's
> >> why I was thinking about it at all. I think it's easier to add support
> >> for it in the easier trawl through the compilers, but I won't argue much
> >> for it otherwise for now.
>
> > Many algorithms require a 2*(pointer width) CAS instruction. On 64-bit
> > platforms that's 16 bytes, but on 32-bit platforms an 8 byte version
> > will suffice.
>
> You're both just handwaving. How many is "many", and which ones might
> we actually have enough use for to justify dealing with such a dependency?
> I don't think we should buy into this without some pretty concrete
> justification.

Well, I don't think either of us is suggesting to make it required. But
it's going to be painful to go through the list of compilers repeatedly
instead of just adding all operations at one. I am willing to do that
for several compilers once, but I don't want to do it in each and every
feature submission using another atomic op.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-10-28 20:29:35 Re: better atomics
Previous Message Tom Lane 2013-10-28 20:14:47 Re: Detection of nested function calls