diff options
author | Dylan Yudaken <dylany@meta.com> | 2022-11-24 12:35:59 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-11-25 16:10:04 +0300 |
commit | 9a6924519e5e882631a7fff429facca838207e45 (patch) | |
tree | cffcb0984df749ccfcc3d24666c00d350f7d226d /io_uring | |
parent | b529c96a896b7bea8464a58d350836cc106d70bd (diff) | |
download | linux-9a6924519e5e882631a7fff429facca838207e45.tar.xz |
io_uring: allow multishot polled reqs to defer completion
Until now there was no reason for multishot polled requests to defer
completions as there was no functional difference. However now this will
actually defer the completions, for a performance win.
Signed-off-by: Dylan Yudaken <dylany@meta.com>
Link: https://lore.kernel.org/r/20221124093559.3780686-10-dylany@meta.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/io_uring.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 7ed9cbeb573f..72c97af4f292 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1803,7 +1803,8 @@ int io_poll_issue(struct io_kiocb *req, bool *locked) io_tw_lock(req->ctx, locked); if (unlikely(req->task->flags & PF_EXITING)) return -EFAULT; - return io_issue_sqe(req, IO_URING_F_NONBLOCK|IO_URING_F_MULTISHOT); + return io_issue_sqe(req, IO_URING_F_NONBLOCK|IO_URING_F_MULTISHOT| + IO_URING_F_COMPLETE_DEFER); } struct io_wq_work *io_wq_free_work(struct io_wq_work *work) |