diff options
author | Stefan Roesch <shr@devkernel.io> | 2023-06-08 18:38:37 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-02-09 19:54:28 +0100 |
commit | ff183d427da0a733b0dbe11bd7acaf2dcb37b4cc (patch) | |
tree | 608885d59ca17fa553a9a9c9edfae6776b63545b /io_uring/sqpoll.c | |
parent | io-uring: add napi busy poll support (diff) | |
download | linux-ff183d427da0a733b0dbe11bd7acaf2dcb37b4cc.tar.xz linux-ff183d427da0a733b0dbe11bd7acaf2dcb37b4cc.zip |
io-uring: add sqpoll support for napi busy poll
This adds the sqpoll support to the io-uring napi.
Signed-off-by: Stefan Roesch <shr@devkernel.io>
Suggested-by: Olivier Langlois <olivier@trillion01.com>
Link: https://lore.kernel.org/r/20230608163839.2891748-6-shr@devkernel.io
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/sqpoll.c')
-rw-r--r-- | io_uring/sqpoll.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c index 28bf0e085d31..f3979cacda13 100644 --- a/io_uring/sqpoll.c +++ b/io_uring/sqpoll.c @@ -15,6 +15,7 @@ #include <uapi/linux/io_uring.h> #include "io_uring.h" +#include "napi.h" #include "sqpoll.h" #define IORING_SQPOLL_CAP_ENTRIES_VALUE 8 @@ -194,6 +195,9 @@ static int __io_sq_thread(struct io_ring_ctx *ctx, bool cap_entries) ret = io_submit_sqes(ctx, to_submit); mutex_unlock(&ctx->uring_lock); + if (io_napi(ctx)) + ret += io_napi_sqpoll_busy_poll(ctx); + if (to_submit && wq_has_sleeper(&ctx->sqo_sq_wait)) wake_up(&ctx->sqo_sq_wait); if (creds) |