Skip to content

Commit b62e0ef

Browse files
committed
io_uring: run local task_work from ring exit IOPOLL reaping
In preparation for needing to shift NVMe passthrough to always use task_work for polled IO completions, ensure that those are suitably run at exit time. See commit: 9ce6c98 ("nvme: always punt polled uring_cmd end_io work to task_work") for details on why that is necessary. Signed-off-by: Jens Axboe <[email protected]>
1 parent 26ec15e commit b62e0ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

io_uring/io_uring.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,6 +1523,9 @@ static __cold void io_iopoll_try_reap_events(struct io_ring_ctx *ctx)
15231523
}
15241524
}
15251525
mutex_unlock(&ctx->uring_lock);
1526+
1527+
if (ctx->flags & IORING_SETUP_DEFER_TASKRUN)
1528+
io_move_task_work_from_local(ctx);
15261529
}
15271530

15281531
static int io_iopoll_check(struct io_ring_ctx *ctx, unsigned int min_events)

0 commit comments

Comments
 (0)