]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring: allow io-wq workers to exit when unused
authorLi Chen <me@linux.beauty>
Mon, 2 Feb 2026 14:37:54 +0000 (22:37 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 2 Feb 2026 15:11:42 +0000 (08:11 -0700)
commit91214661489467f8452d34edbf257488d85176e4
tree21551850cb34aad15fd00df4ba156002ecf174a1
parent38aa434ab9335ce2d178b7538cdf01d60b2014c3
io_uring: allow io-wq workers to exit when unused

io_uring keeps a per-task io-wq around, even when the task no longer has
any io_uring instances.

If the task previously used io_uring for file I/O, this can leave an
unrelated iou-wrk-* worker thread behind after the last io_uring
instance is gone.

When the last io_uring ctx is removed from the task context, mark the
io-wq exit-on-idle so workers can go away. Clear the flag on subsequent
io_uring usage.

Signed-off-by: Li Chen <me@linux.beauty>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/tctx.c