-
- Downloads
There was an error fetching the commit references. Please try again later.
io_uring: reduce scheduling due to tw
Every task_work will try to wake the task to be executed, which causes excessive scheduling and additional overhead. For some tw it's justified, but others won't do much but post a single CQE. When a task waits for multiple cqes, every such task_work will wake it up. Instead, the task may give a hint about how many cqes it waits for, io_req_local_work_add() will compare against it and skip wake ups if #cqes + #tw is not enough to satisfy the waiting condition. Task_work that uses the optimisation should be simple enough and never post more than one CQE. It's also ignored for non DEFER_TASKRUN rings. Signed-off-by:Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/d2b77e99d1e86624d8a69f7037d764b739dcd225.1680782017.git.asml.silence@gmail.com Signed-off-by:
Jens Axboe <axboe@kernel.dk>
Showing
- include/linux/io_uring_types.h 2 additions, 1 deletioninclude/linux/io_uring_types.h
- io_uring/io_uring.c 47 additions, 21 deletionsio_uring/io_uring.c
- io_uring/io_uring.h 9 additions, 0 deletionsio_uring/io_uring.h
- io_uring/notif.c 1 addition, 1 deletionio_uring/notif.c
- io_uring/notif.h 1 addition, 1 deletionio_uring/notif.h
- io_uring/rw.c 1 addition, 1 deletionio_uring/rw.c
Loading
Please register or sign in to comment