Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vat2c-0006Wa-2g for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Oct 2013 20:03:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vat2b-0007u8-DD for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Oct 2013 20:03:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vat2Z-0007sN-GQ for pgsql-hackers@postgresql.org; Mon, 28 Oct 2013 20:03:55 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vat2S-0008KP-FP for pgsql-hackers@postgresql.org; Mon, 28 Oct 2013 20:03:55 +0000 Received: from sc9-mailhost3.vmware.com (sc9-mailhost3.vmware.com [10.113.161.73]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 0984C2975C; Mon, 28 Oct 2013 13:03:45 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 0529B40170; Mon, 28 Oct 2013 13:03:45 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id 53E7CC0058; Mon, 28 Oct 2013 13:04:00 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTPSA; Mon, 28 Oct 2013 13:03:58 -0700 (PDT) Message-ID: <526EC31D.4070802@vmware.com> Date: Mon, 28 Oct 2013 22:03:41 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Andres Freund CC: Robert Haas , Tom Lane , Peter Geoghegan , Pg Hackers , Ants Aasma Subject: Re: better atomics References: <20131028181942.GC20248@awork2.anarazel.de> <20131028193230.GF20248@awork2.anarazel.de> In-Reply-To: <20131028193230.GF20248@awork2.anarazel.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.4 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers