Hi, MSG_RING rolls its own task_work handling, which there's really no need for. Rather, it should use the generic io_uring infrastructure for this. Add a helper for remote execution, and switch over MSG_RING to use it. This both cleans up the code, and improves performance of this opcode considerably. Changes since v1: - Only pass in ctx, not both ctx and task (Pavel) - Fix io_req_task_work_add_remote() not using passed in 'ctx' for flags check - Get rid of unneeded references on the io_kiocb io_uring/io_uring.c | 30 ++++++++++++++++++++++-------- io_uring/io_uring.h | 2 ++ io_uring/msg_ring.c | 34 ++++++++++------------------------ 3 files changed, 34 insertions(+), 32 deletions(-) -- Jens Axboe