Re: Spinlocks and compiler/memory barriers - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Spinlocks and compiler/memory barriers
Date
Msg-id 20140924184527.GB19755@awork2.anarazel.de
Whole thread Raw
In response to Re: Spinlocks and compiler/memory barriers  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Spinlocks and compiler/memory barriers  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2014-09-09 17:54:03 -0400, Robert Haas wrote:
> So, that's committed, then. I think we should pick something that uses
> spinlocks and is likely to fail spectacularly if we haven't got this
> totally right yet, and de-volatilize it.  And then watch to see what
> turns red in the buildfarm and/or which users start screaming.  I'm
> inclined to propose lwlock.c as a candidate, since that's very widely
> used and a place where we know there's significant contention.

Did you consider removing the volatiles from bufmgr.c? There's lots of
volatiles in there and most of them don't seem to have been added in a
principled way. I'm looking at my old patch for lockless pin/unpin of
buffers and it'd look a lot cleaner without.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: add modulo (%) operator to pgbench
Next
From: Robert Haas
Date:
Subject: Re: identify_locking_dependencies is broken for schema-only dumps