diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-07-12 22:52:40 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-07-25 02:41:06 +0200 |
commit | e58d498e81baa9fd8acf5132d8b2d4f829361f6b (patch) | |
tree | addc514ac82d4325ee3fa2dc2f0e7b0aa9ca97bb /io_uring/notif.h | |
parent | io_uring: cache struct io_notif (diff) | |
download | linux-e58d498e81baa9fd8acf5132d8b2d4f829361f6b.tar.xz linux-e58d498e81baa9fd8acf5132d8b2d4f829361f6b.zip |
io_uring: complete notifiers in tw
We need a task context to post CQEs but using wq is too expensive.
Try to complete notifiers using task_work and fall back to wq if fails.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/089799ab665b10b78fdc614ae6d59fa7ef0d5f91.1657643355.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/notif.h')
-rw-r--r-- | io_uring/notif.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/io_uring/notif.h b/io_uring/notif.h index b23c9c0515bb..23ca7620fff9 100644 --- a/io_uring/notif.h +++ b/io_uring/notif.h @@ -11,6 +11,9 @@ struct io_notif { struct ubuf_info uarg; struct io_ring_ctx *ctx; + /* complete via tw if ->task is non-NULL, fallback to wq otherwise */ + struct task_struct *task; + /* cqe->user_data, io_notif_slot::tag if not overridden */ u64 tag; /* see struct io_notif_slot::seq */ |