Re: Replace buffer I/O locks with condition variables (reviving an old patch)
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2021-03-04T23:12:36Z
Lists: pgsql-hackers
Attachments
- v2-0001-Replace-buffer-I-O-locks-with-condition-variables.patch (text/x-patch) patch v2-0001
On Fri, Feb 26, 2021 at 7:08 PM Thomas Munro <thomas.munro@gmail.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.
Commits
-
Improve comment for struct BufferDesc.
- 049d9b872db8 14.0 landed
-
Replace buffer I/O locks with condition variables.
- d87251048a0f 14.0 landed
-
Move buffer I/O and content LWLocks out of the main tranche.
- 6150a1b08a9f 9.6.0 cited