Re: Lockless StrategyGetBuffer() clock sweep - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Lockless StrategyGetBuffer() clock sweep
Date
Msg-id 20141223215140.GG23613@alap3.anarazel.de
Whole thread Raw
In response to Re: Lockless StrategyGetBuffer() clock sweep  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Lockless StrategyGetBuffer() clock sweep
Next
From: Andreas Karlsson
Date:
Subject: Re: Using 128-bit integers for sum, avg and statistics aggregates