Re: Replace buffer I/O locks with condition variables (reviving an old patch)

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Replace buffer I/O locks with condition variables (reviving an old patch)
Date: 2021-03-04 23:12:36
Message-ID: CA+hUKGKv3HmjNggbSckDLHDdR=fYY2WRw4r-ijvB6CAG1SS4gQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 26, 2021 at 7:08 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> Back in 2016, Robert Haas proposed to replace I/O locks with condition
> variables[1]. Condition variables went in and have found lots of
> uses, but this patch to replace a bunch of LWLocks and some busy
> looping did not. Since then, it has been tested quite a lot as part
> of the AIO project[2], which currently depends on it. That's why I'm
> interested in following up now. I asked Robert if he planned to
> re-propose it and he said I should go for it, so... here I go.

I removed a redundant (Size) cast, fixed the wait event name and
category (WAIT_EVENT_BUFFILE_XXX is for buffile.c stuff, not bufmgr.c
stuff, and this is really an IPC wait, not an IO wait despite the
name), updated documentation and pgindented.

Attachment Content-Type Size
v2-0001-Replace-buffer-I-O-locks-with-condition-variables.patch text/x-patch 14.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2021-03-04 23:21:14 Re: PROXY protocol support
Previous Message Tatsuo Ishii 2021-03-04 23:08:37 Re: PROXY protocol support