From: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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:03:41 |
Message-ID: | 526EC31D.4070802@vmware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 28.10.2013 21:32, Andres Freund wrote:
> On 2013-10-28 15:02:41 -0400, Robert Haas wrote:
>> Most of the academic papers I've read on
>> implementing lock-free or highly-parallel constructs attempt to
>> confine themselves to 8-byte operations with 8-byte compare-and-swap,
>> and I'm a bit disposed to think we ought to try to hew to that as
>> well. I'm not dead set against going further, but I lean against it,
>> for all of the reasons mentioned above.
>
> 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.
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-10-28 20:06:47 | Re: better atomics |
Previous Message | Tom Lane | 2013-10-28 20:02:36 | Re: OSX doesn't accept identical source/target for strcpy() anymore |