On Thu, Nov 5, 2026 at 6:25 PM Xuneng Zhou <[email protected]> wrote:
> I could
> write a follow-up patch or review it if you already did.

I tried to write a patch that keeps postmaster-local copies of the io_uring
descriptors and passes them to io_uring_queue_exit() for cleanup. Attached.

Per [1], io_uring_queue_exit() seems to use sq.kring_entries. Since this is
a pointer [2], simply copying the descriptor would leave it pointing into
shared memory. So, the patch also saves the pointed-to value locally.

But, I'm not sure this is the right approach... It relies on liburing's
implementation rather than a documented guarantee, so future liburing changes
would be really easily able to break it. This seems very fragile. Thought?
Is there a better approach?

Regards,

[1] https://github.com/axboe/liburing/blob/liburing-2.7/src/setup.c#L430-L445
[2] 
https://github.com/axboe/liburing/blob/liburing-2.7/src/include/liburing.h#L77-L83

-- 
Fujii Masao

Attachment: v1-0001-Use-postmaster-local-metadata-for-io_uring-cleanu.patch
Description: Binary data

Reply via email to