diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-09-24 13:47:15 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-09-26 03:55:40 -0600 |
commit | bda521624e75c665c407b3d9cece6e7a28178cd8 (patch) | |
tree | f6b34adf621ac71e5c5257d92e9c6d5ab9b58c1f /net | |
parent | daa5de5415849b9a53056ec1e1e88fe4c5c9aa2b (diff) |
io_uring: make CQ ring wakeups be more efficient
For batched IO, it's not uncommon for waiters to ask for more than 1
IO to complete before being woken up. This is a problem with
wait_event() since tasks will get woken for every IO that completes,
re-check condition, then go back to sleep. For batch counts on the
order of what you do for high IOPS, that can result in 10s of extra
wakeups for the waiting task.
Add a private wake function that checks for the wake up count criteria
being met before calling autoremove_wake_function(). Pavel reports that
one test case he has runs 40% faster with proper batching of wakeups.
Reported-by: Pavel Begunkov <asml.silence@gmail.com>
Tested-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions