Skip to content

Commit

Permalink
io_uring/msg_ring: flag target ring as having task_work, if needed
Browse files Browse the repository at this point in the history
Before the recent change, we didn't even wake the targeted task when
posting the cqe remotely. Now we do wake it, but we do want to ensure
that the recipient knows there's potential work there that needs to
get processed to get the CQE posted.

OR in IORING_SQ_TASKRUN for that purpose.

Link: https://lore.kernel.org/io-uring/2843c6b4-ba9a-b67d-e0f4-957f42098489@kernel.dk/
Fixes: 6d043ee ("io_uring: do msg_ring in target task via tw")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
axboe committed Dec 8, 2022
1 parent f66f734 commit 761c61c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions io_uring/msg_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ static int io_msg_ring_data(struct io_kiocb *req)
TWA_SIGNAL_NO_IPI))
return -EOWNERDEAD;

atomic_or(IORING_SQ_TASKRUN, &target_ctx->rings->sq_flags);
return IOU_ISSUE_SKIP_COMPLETE;
}

Expand Down

0 comments on commit 761c61c

Please sign in to comment.