summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-05-28 08:40:12 -0600
committerJens Axboe <axboe@kernel.dk>2024-06-24 08:39:34 -0600
commitd57afd8bb7f2c4f0d86e9e9b276f7c3a7fedfc6d (patch)
tree87e4abbd413d2c612b54c7ce6c7b7ba9f4b98616 /io_uring
parent6bc9199d0c84f5cd72922223231c7708698059a2 (diff)
io_uring/msg_ring: tighten requirement for remote posting
Currently this is gated on whether or not the target ring needs a local completion - and if so, whether or not we're running on the right task. The use case for same thread cross posting is probably a lot less relevant than remote posting. And since we're going to improve this situation anyway, just gate it on local posting and ignore what task we're currently running on. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/msg_ring.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/io_uring/msg_ring.c b/io_uring/msg_ring.c
index 81c4a9d43729..9fdb0cc19bfd 100644
--- a/io_uring/msg_ring.c
+++ b/io_uring/msg_ring.c
@@ -68,9 +68,7 @@ void io_msg_ring_cleanup(struct io_kiocb *req)
static inline bool io_msg_need_remote(struct io_ring_ctx *target_ctx)
{
- if (!target_ctx->task_complete)
- return false;
- return current != target_ctx->submitter_task;
+ return target_ctx->task_complete;
}
static int io_msg_exec_remote(struct io_kiocb *req, task_work_func_t func)