diff options
author | Dylan Yudaken <dylany@meta.com> | 2022-11-07 15:33:49 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-11-21 17:38:54 +0300 |
commit | ef67fcb41de6d3d5bbb16aaa66d4c706c4cacf54 (patch) | |
tree | 2d32a930271cdc6512e2c8ea59676ff0e751ae46 /io_uring/io_uring.c | |
parent | df730ec21f7ba395b1b22e7f93a3a85b1d1b7882 (diff) | |
download | linux-ef67fcb41de6d3d5bbb16aaa66d4c706c4cacf54.tar.xz |
io_uring: do not always force run task_work in io_uring_register
Running task work when not needed can unnecessarily delay
operations. Specifically IORING_SETUP_DEFER_TASKRUN tries to avoid running
task work until the user requests it. Therefore do not run it in
io_uring_register any more.
The one catch is that io_rsrc_ref_quiesce expects it to have run in order
to process all outstanding references, and so reorder it's loop to do this.
Signed-off-by: Dylan Yudaken <dylany@meta.com>
Link: https://lore.kernel.org/r/20221107123349.4106213-1-dylany@meta.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.c')
-rw-r--r-- | io_uring/io_uring.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index bdb7e15f1c48..cf68d16255a0 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -4056,8 +4056,6 @@ SYSCALL_DEFINE4(io_uring_register, unsigned int, fd, unsigned int, opcode, ctx = f.file->private_data; - io_run_task_work_ctx(ctx); - mutex_lock(&ctx->uring_lock); ret = __io_uring_register(ctx, opcode, arg, nr_args); mutex_unlock(&ctx->uring_lock); |