Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3XMq-00023L-Ig for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 21:51:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y3XMp-0000bD-Po for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 21:51:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y3XMo-0000b6-97 for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 21:51:46 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3XMk-0007p4-QM for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 21:51:45 +0000 Received: from intern.anarazel.de (unknown [88.128.80.92]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 53E5B460007; Tue, 23 Dec 2014 22:51:41 +0100 (CET) Date: Tue, 23 Dec 2014 22:51:40 +0100 From: Andres Freund To: Robert Haas Cc: "pgsql-hackers@postgresql.org" Subject: Re: Lockless StrategyGetBuffer() clock sweep Message-ID: <20141223215140.GG23613@alap3.anarazel.de> References: <20141027133218.GA2639@awork2.anarazel.de> <20141029190927.GF17724@awork2.anarazel.de> <20141208195139.GB30157@alap3.anarazel.de> <20141223203052.GC23613@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 2014-12-23 16:42:41 -0500, Robert Haas wrote: > I don't think I have anything to say about the substance of the patch. > If fetch-and-add is faster than a spinlock cycle, then it is. And > it's good to be fast. I don't think the primary advantage is that it's fast (even though it should be as fast as a single TAS on x86). It's that you can never sleep while holding the spinlock when there's no such spinlock and that everytime you transfer the cacheline from another cpu to you you'll also make progress... Will fix the other stuff. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers