Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqLzj-0002Ix-HK for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Apr 2016 14:42:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aqLzj-0002wv-3M for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Apr 2016 14:42:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aqLzi-0002wA-0U for pgsql-hackers@postgresql.org; Wed, 13 Apr 2016 14:42:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aqLzd-00016C-8x; Wed, 13 Apr 2016 14:42:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u3DEg3oW022527; Wed, 13 Apr 2016 10:42:03 -0400 From: Tom Lane To: Robert Haas cc: Andres Freund , Alvaro Herrera , Noah Misch , Kevin Grittner , Kevin Grittner , "pgsql-hackers@postgresql.org" Subject: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < In-reply-to: References: <20160412185625.g7ixnlpwaqvsqt7v@alap3.anarazel.de> <20160413025214.GA954515@alvherre.pgsql> <20160413030530.dfldqhmtojo222c4@alap3.anarazel.de> <20591.1460555524@sss.pgh.pa.us> <21698.1460557237@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Wed, 13 Apr 2016 10:32:58 -0400" Date: Wed, 13 Apr 2016 10:42:03 -0400 Message-ID: <22526.1460558523@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) 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 Robert Haas writes: > On Wed, Apr 13, 2016 at 10:20 AM, Tom Lane wrote: >> That's what I thought you were going to say, and it means that any >> "performance improvement" patch that relies on 64-bit atomics in hotspot >> code paths is going to be a complete disaster on anything but modern Intel >> hardware. I'm not sure that's a direction we want to go in. We need to >> stick to a set of atomics that's pretty widely portable. > I think 64-bit atomics *are* pretty widely portable. Can you name a > system with more than 4 CPU cores that doesn't support them? No, you're ignoring my point, which is what happens on single-CPU 32-bit machines, and whether we aren't going to destroy performance on low-end machines in pursuit of better performance on high-end. Now, to the extent that a patch uses a 64-bit atomic op to replace a spinlock acquisition, it might be pretty much a wash if low-end machines have to use a spinlock to emulate the atomic op. But it would be really easy for the translation to replace one spinlock acquisition with multiple spinlock acquisitions, and that would hurt. 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