summaryrefslogtreecommitdiff
path: root/io_uring/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2024-08-07 15:18:12 +0100
committerJens Axboe <axboe@kernel.dk>2024-08-25 08:27:01 -0600
commitd5cce407e4f59b2e08d03e29d2b3c55deacc1d48 (patch)
treee9a7437627ad8d0ccd5c0d1e4b1924319797e08d /io_uring/io_uring.c
parent489b80060cf645e958c4755c4b5032f234409f85 (diff)
downloadlinux-d5cce407e4f59b2e08d03e29d2b3c55deacc1d48.tar.gz
linux-d5cce407e4f59b2e08d03e29d2b3c55deacc1d48.tar.bz2
linux-d5cce407e4f59b2e08d03e29d2b3c55deacc1d48.zip
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>
Diffstat (limited to 'io_uring/io_uring.c')
-rw-r--r--io_uring/io_uring.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 3942db160f18..9ec07f76ad19 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2423,7 +2423,6 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events,
dt = timespec64_to_ktime(ts);
iowq.timeout = ktime_add(dt, ktime_get());
- io_napi_adjust_timeout(ctx, &iowq, dt);
}
if (sig) {