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, 18 Aug 2024 20:40:21 +0000 (14:40 -0600)
commit262580d3d7948a4d4c3b19c3630c861caeb8ba56
tree01d44e1bf32299d4852de92b0433b1872531ed0e
parentcba7995f0f219fa5570b9087678f0094d85a3a0f
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