]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring/sqpoll: manage task_work privately
authorJens Axboe <axboe@kernel.dk>
Fri, 2 Feb 2024 17:20:05 +0000 (10:20 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Feb 2024 20:27:06 +0000 (13:27 -0700)
commitaf5d68f8892f8ee8f137648b79ceb2abc153a19b
treed76f98bfd630ee568e19f16aa2646de2b64dc1df
parent2708af1adc11700c6c3ce4109e3b133079a36a78
io_uring/sqpoll: manage task_work privately

Decouple from task_work running, and cap the number of entries we process
at the time. If we exceed that number, push remaining entries to a retry
list that we'll process first next time.

We cap the number of entries to process at 8, which is fairly random.
We just want to get enough per-ctx batching here, while not processing
endlessly.

Since we manually run PF_IO_WORKER related task_work anyway as the task
never exits to userspace, with this we no longer need to add an actual
task_work item to the per-process list.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/io_uring.h
io_uring/sqpoll.c