Re: Wait free LW_SHARED acquisition - v0.10 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Wait free LW_SHARED acquisition - v0.10
Date
Msg-id 20141223191108.GB23613@alap3.anarazel.de
Whole thread Raw
In response to Wait free LW_SHARED acquisition  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Hi,

Attached is a new version of the patchset which I intend to commit soon.

Stuff changed since 0.9:

* Greatly simplified locking logic - the whole concept that a lock could
  be spuriously acquired is gone. That cost a small bit of performance
  (0.5%, I thought it'd be much bigger) on x86, but is a noticeable
  performance *benefit* on PPC.

* releaseOK (and other internal flags) are rolled into the former
  'lockcount' variable which is now named state. By having it inside the
  same atomic reasoning about the state gets easier as there's no skew
  between observing the lockcount and other variables.

* The number of queued waiters isn't required anymore, it's only a
  debugging aid (#ifdef LOCK_DEBUG) at this point.

Patches:
0001: errhidecontext() patch
0002: dlist()ify lwWaitLink
0003: LW_SHARED scalability

I've done a fair amount of benchmarking and on bigger system the new
code seems to be a win pretty much generally.

Greetings,

Andres Freund

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

Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Proposal: two new role attributes and/or capabilities?
Next
From: Bruce Momjian
Date:
Subject: Commit timestamp abbreviations