From: | Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Peter Eisentraut <peter(at)eisentraut(dot)org> |
Subject: | Re: [PATCH] OAuth: fix performance bug with stuck multiplexer events |
Date: | 2025-08-07 18:11:02 |
Message-ID: | CAOYmi+=FVbELVYRq=kUri4EOjanyxNGjd2F1H-kMY9h2y=bVGg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Aug 6, 2025 at 6:46 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> "Unlike epoll descriptors, kqueue descriptors only transition from
> readable to unreadable when kevent() is called and finds nothing,
> after removing level-triggered conditions that have gone away. We
> therefore need a dummy kevent() call after operations might have been
> performed on the monitored sockets or timer_fd. Any event returned is
> ignored here, but it also remains queued (being level-triggered) and
> leaves the descriptor readable. This is a no-op for epoll
> descriptors."
I really like this; I'm working it into the doc comment.
> FWIW I re-read the kqueue paper's discussion of the goals of making
> kqueue descriptors themselves monitorable/pollable, and it seems it
> was mainly intended for hierarchies of kqueues, like your timer_fd,
> with the specific aim of expressing priorities. It doesn't talk about
> giving them to code that doesn't know it has a kqueue fd (the client)
> and never calls kevent() and infers the events instead (libcurl).
Interesting! It would be nice if they papered over this for us, but I
guess that's water under the bridge.
> s/signalled/signaled/ (= US spelling) in a couple of places.
Ah. Will fix(?) or else lobby the dictionary companies.
Thank you so much for the reviews!
--Jacob
From | Date | Subject | |
---|---|---|---|
Next Message | Jacob Champion | 2025-08-07 18:11:46 | Re: [PATCH] OAuth: fix performance bug with stuck multiplexer events |
Previous Message | Mat Arye | 2025-08-07 16:46:47 | Read-only connection mode for AI workflows. |