summaryrefslogtreecommitdiff
path: root/io_uring/notif.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-07-12 21:52:40 +0100
committerJens Axboe <axboe@kernel.dk>2022-07-24 18:41:06 -0600
commite58d498e81baa9fd8acf5132d8b2d4f829361f6b (patch)
treeaddc514ac82d4325ee3fa2dc2f0e7b0aa9ca97bb /io_uring/notif.h
parenteb4a299b2f95437af6183946c2a2e850621cefdb (diff)
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.h3
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 */