Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqMtH-0004hx-Tz for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Apr 2016 15:39:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aqMtH-0008R4-Gk for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Apr 2016 15:39:39 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aqMrs-0005kw-3O for pgsql-hackers@postgresql.org; Wed, 13 Apr 2016 15:38:12 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aqMrp-0006lb-LZ for pgsql-hackers@postgresql.org; Wed, 13 Apr 2016 15:38:10 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id EC9C820DA7 for ; Wed, 13 Apr 2016 11:38:08 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Wed, 13 Apr 2016 11:38:08 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=HD9vm6xTKHSeBP5HFib06GGBvpA=; b=FooxQ luKxgKriqUTqFryvut0pDXIXqzaLDE50aHNZSS8Y5tpL1Ie4l3rst2ap6sesb0s0 2cPegpINXcf9gcUrP6LI15+k+4xdkGtGqMac8+8s/xGVrr6hOi3CxX903UL08X6N vtTmIOiaVAXvULXqVCDkQVF2LtupFAA4c9iEFo= X-Sasl-enc: vBiOJoYeHKUwCrTbKlB0tgksPBqWbbWn7jWXoXoivqt2 1460561888 Received: from intern.anarazel.de (unknown [192.77.237.104]) by mail.messagingengine.com (Postfix) with ESMTPA id 83D0FC00014; Wed, 13 Apr 2016 11:38:08 -0400 (EDT) Date: Wed, 13 Apr 2016 08:38:07 -0700 From: Andres Freund To: Robert Haas Cc: Tom Lane , 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 < Message-ID: <20160413153807.3ztdnh2ugu3xjzxc@alap3.anarazel.de> References: <20160413025214.GA954515@alvherre.pgsql> <20160413030530.dfldqhmtojo222c4@alap3.anarazel.de> <20591.1460555524@sss.pgh.pa.us> <21698.1460557237@sss.pgh.pa.us> <22526.1460558523@sss.pgh.pa.us> <20160413151801.nafgcxlitagi6fec@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -2.6 (--) 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 2016-04-13 11:27:09 -0400, Robert Haas wrote: > That page is sort of confusing, because it says that platform has > those things but then says ***, which is footnoted to mean "linux > kernel emulation available", but it's not too clear whether that > applies to all atomics or just 8-byte atomics. The operator > precedence of / (used as a separator) vs. footnotes is not stated. / has a higher precedence than footnotes. Not sure how to make that easily clear. I'm not exactly a mediawiki expert. > It's also not clear what "linux kernel emulation available" actually > means. Should we think of those things being fast, or slow? Slow. It means that the compiler generates a syscall to perform the atomic. The syscall disables preemption, then performs the actual math, re-enables preemption, and returns. That's a lot more expensive than a spinlock. There's /* * 64 bit atomics on arm are implemented using kernel fallbacks and might be * slow, so disable entirely for now. * XXX: We might want to change that at some point for AARCH64 */ #define PG_DISABLE_64_BIT_ATOMICS for that reason (in the current tree, not patch). The whole fallback facility exists to make it easier to port software to arm; but I wouldn't want to rely on it if not necessary. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers