]> git.ipfire.org Git - thirdparty/linux.git/commit
io_uring: IOPOLL polling improvements
authorJens Axboe <axboe@kernel.dk>
Thu, 11 Dec 2025 10:25:41 +0000 (03:25 -0700)
committerJens Axboe <axboe@kernel.dk>
Sun, 28 Dec 2025 22:54:45 +0000 (15:54 -0700)
commit3c7d76d6128a0fef68e6540754bf85a44a29bb59
tree1fed05d9c7c6ba8891b7a0517c725ea899be5844
parentf8f9c1f4d0c7a64600e2ca312dec824a0bc2f1da
io_uring: IOPOLL polling improvements

io_uring manages issued and pending IOPOLL read/write requests in a
singly linked list. One downside of that is that individual items
cannot easily be removed from that list, and as a result, io_uring
will only complete a completed request N in that list if 0..N-1 are
also complete. For homogenous IO this isn't necessarily an issue,
but if different devices are involved in polling in the same ring, or
if disparate IO from the same device is being polled for, this can
defer completion of some requests unnecessarily.

Move to a doubly linked list for iopoll completions instead, making it
possible to easily complete whatever requests that were polled done
successfully.

Co-developed-by: Fengnan Chang <fengnanchang@gmail.com>
Link: https://lore.kernel.org/io-uring/20251210085501.84261-1-changfengnan@bytedance.com/
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
io_uring/cancel.c
io_uring/io_uring.c
io_uring/rw.c
io_uring/slist.h
io_uring/sqpoll.c