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