Skip to content

Commit d57afd8

Browse files
committed
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 <[email protected]>
1 parent 6bc9199 commit d57afd8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

io_uring/msg_ring.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ void io_msg_ring_cleanup(struct io_kiocb *req)
6868

6969
static inline bool io_msg_need_remote(struct io_ring_ctx *target_ctx)
7070
{
71-
if (!target_ctx->task_complete)
72-
return false;
73-
return current != target_ctx->submitter_task;
71+
return target_ctx->task_complete;
7472
}
7573

7674
static int io_msg_exec_remote(struct io_kiocb *req, task_work_func_t func)

0 commit comments

Comments
 (0)