summaryrefslogtreecommitdiff
path: root/io_uring/uring_cmd.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2023-04-06 16:20:14 +0300
committerJens Axboe <axboe@kernel.dk>2023-04-07 01:24:36 +0300
commit360cd42c4e95ff06d8d7b0a54e42236c7e7c187f (patch)
tree97807acf0f2bcb3ada1ad005bbaa8d95396aceab /io_uring/uring_cmd.c
parentc66ae3ec38f946edb1776d25c1c8cd63803b8ec3 (diff)
downloadlinux-360cd42c4e95ff06d8d7b0a54e42236c7e7c187f.tar.xz
io_uring: optimise io_req_local_work_add
Chains of memory accesses are never good for performance. The req->task->io_uring->in_cancel in io_req_local_work_add() is there so that when a task is exiting via io_uring_try_cancel_requests() and starts waiting for completions, it gets woken up by every new task_work item queued. Do a little trick by announcing waiting in io_uring_try_cancel_requests(), making io_req_local_work_add() wake us up. We also need to check for deferred tw items after prepare_to_wait(TASK_INTERRUPTIBLE); Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/fb11597e9bbcb365901824f8c5c2cf0d6ee100d0.1680782017.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/uring_cmd.c')
0 files changed, 0 insertions, 0 deletions