Commit d57afd8b authored by Jens Axboe's avatar Jens Axboe

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: default avatarJens Axboe <axboe@kernel.dk>
parent 6bc9199d
...@@ -68,9 +68,7 @@ void io_msg_ring_cleanup(struct io_kiocb *req) ...@@ -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) static inline bool io_msg_need_remote(struct io_ring_ctx *target_ctx)
{ {
if (!target_ctx->task_complete) return target_ctx->task_complete;
return false;
return current != target_ctx->submitter_task;
} }
static int io_msg_exec_remote(struct io_kiocb *req, task_work_func_t func) static int io_msg_exec_remote(struct io_kiocb *req, task_work_func_t func)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment