]> git.ipfire.org Git - thirdparty/linux.git/commit
io_uring/napi: postpone napi timeout adjustment
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 7 Aug 2024 14:18:12 +0000 (15:18 +0100)
committerJens Axboe <axboe@kernel.dk>
Sun, 25 Aug 2024 14:27:01 +0000 (08:27 -0600)
commitd5cce407e4f59b2e08d03e29d2b3c55deacc1d48
treee9a7437627ad8d0ccd5c0d1e4b1924319797e08d
parent489b80060cf645e958c4755c4b5032f234409f85
io_uring/napi: postpone napi timeout adjustment

Remove io_napi_adjust_timeout() and move the adjustments out of the
common path into __io_napi_busy_loop(). Now the limit it's calculated
based on struct io_wait_queue::timeout, for which we query current time
another time. The overhead shouldn't be a problem, it's a polling path,
however that can be optimised later by additionally saving the delta
time value in io_cqring_wait().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/88e14686e245b3b42ff90a3c4d70895d48676206.1723039801.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/napi.c
io_uring/napi.h