]> git.ipfire.org Git - thirdparty/linux.git/commit
io_uring: switch normal task_work to a mpscq
authorJens Axboe <axboe@kernel.dk>
Thu, 11 Jun 2026 16:13:22 +0000 (10:13 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 13 Jun 2026 12:27:11 +0000 (06:27 -0600)
commitde7341ffe49ed30a1d75b254ac8c731b057247bf
treeb619dd9a1e974e209ba9b6db7368d64e10597cc2
parentd46ab2c98ababa19b41a5709b6921d7b1add7f74
io_uring: switch normal task_work to a mpscq

Like the local task_work list, the normal (tctx) task_work list is an
llist, and hence needs the O(n) llist_reverse_order() pass before
running entries in queue order. On top of that, capped runs - sqpoll
processing IORING_TW_CAP_ENTRIES_VALUE entries at a time - need the
claimed-but-unprocessed leftovers carried in a separate retry_list,
as they can't be pushed back to the shared list.

Switch tctx->task_list to a mpscq, like what was done for the
DEFER_TASKRUN paths as well.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
io_uring/sqpoll.c
io_uring/tctx.c
io_uring/tw.c
io_uring/tw.h