pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Avoid the use of a separate spinlock to protect a LWLock's wait
Date: Mon, 11 Apr 2016 03:12:51 +0000
Message-ID: <E1apSHT-0007xK-Bl@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Avoid the use of a separate spinlock to protect a LWLock's wait queue.
Previously we used a spinlock, in adition to the atomically manipulated
->state field, to protect the wait queue. But it's pretty simple to
instead perform the locking using a flag in state.
Due to 6150a1b0 BufferDescs, on platforms (like PPC) with > 1 byte
spinlocks, increased their size above 64byte. As 64 bytes are the size
we pad allocated BufferDescs to, this can increase false sharing;
causing performance problems in turn. Together with the previous commit
this reduces the size to <= 64 bytes on all common platforms.
Author: Andres Freund
Discussion: CAA4eK1+ZeB8PMwwktf+3bRS0Pt4Ux6Rs6Aom0uip8c6shJWmyg@mail.gmail.com
20160327121858.zrmrjegmji2ymnvr@alap3.anarazel.de
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/008608b9d51061b1f598c197477b3dc7be9c4a64
Modified Files
--------------
src/backend/storage/lmgr/lwlock.c | 189 ++++++++++++++++++++++----------------
src/include/storage/lwlock.h | 6 +-
2 files changed, 113 insertions(+), 82 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Message-ID: <E1apSHT-0007xK-Bl@gemulon.postgresql.org> Permalink: ../E1apSHT-0007xK-Bl@gemulon.postgresql.org/ Also on: postgresql.org/message-id/E1apSHT-0007xK-Bl@gemulon.postgresql.org ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-committers@postgresql.org Cc: andres@anarazel.de Subject: Re: pgsql: Avoid the use of a separate spinlock to protect a LWLock's wait In-Reply-To: <E1apSHT-0007xK-Bl@gemulon.postgresql.org> References: <E1apSHT-0007xK-Bl@gemulon.postgresql.org> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox