pgsql: Convert the PGPROC->lwWaitLink list into a dlist instead of open

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Convert the PGPROC->lwWaitLink list into a dlist instead of open
Date: 2014-12-25 16:49:00
Message-ID: E1Y4Bau-0005fS-D8@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Convert the PGPROC->lwWaitLink list into a dlist instead of open coding it.

Besides being shorter and much easier to read it changes the logic in
LWLockRelease() to release all shared lockers when waking up any. This
can yield some significant performance improvements - and the fairness
isn't really much worse than before, as we always allowed new shared
lockers to jump the queue.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7882c3b0b95640e361f1533fe0f2d02e4e5d8610

Modified Files
--------------
src/backend/access/transam/twophase.c | 1 -
src/backend/storage/lmgr/lwlock.c | 146 ++++++++++++---------------------
src/backend/storage/lmgr/proc.c | 2 -
src/include/storage/lwlock.h | 5 +-
src/include/storage/proc.h | 3 +-
5 files changed, 57 insertions(+), 100 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2014-12-25 17:34:53 pgsql: Lockless StrategyGetBuffer clock sweep hot path.
Previous Message Andres Freund 2014-12-25 16:05:11 Re: pgsql: Move pg_lzcompress.c to src/common.

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2014-12-25 17:09:17 Re: pgaudit - an auditing extension for PostgreSQL
Previous Message Andres Freund 2014-12-25 13:16:54 Re: Moving RestoreBlockImage from xlogreader.c to xlogutils.c