diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2025-03-21 18:04:33 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-03-21 12:52:15 -0600 |
commit | 3a4689ac109f18f23ea0d0c1c79e055142796858 (patch) | |
tree | 35395b11bf349968cff38ede45b96f7b25a446de /io_uring/uring_cmd.h | |
parent | 5f14404bfa245a156915ee44c827edc56655b067 (diff) |
io_uring/cmd: add iovec cache for commands
Add iou_vec to commands and wire caching for it, but don't expose it to
users just yet. We need the vec cleared on initial alloc, but since
we can't place it at the beginning at the moment, zero the entire
async_data. It's cached, and the performance effects only the initial
allocation, and it might be not a bad idea since we're exposing those
bits to outside drivers.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/c0f2145b75791bc6106eb4e72add2cf6a2c72a7a.1742579999.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/uring_cmd.h')
-rw-r--r-- | io_uring/uring_cmd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/io_uring/uring_cmd.h b/io_uring/uring_cmd.h index 2ec3a8785534..b45ec7cffcd1 100644 --- a/io_uring/uring_cmd.h +++ b/io_uring/uring_cmd.h @@ -1,13 +1,18 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/io_uring/cmd.h> +#include <linux/io_uring_types.h> struct io_async_cmd { struct io_uring_cmd_data data; + struct iou_vec vec; }; int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags); int io_uring_cmd_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); +void io_uring_cmd_cleanup(struct io_kiocb *req); bool io_uring_try_cancel_uring_cmd(struct io_ring_ctx *ctx, struct io_uring_task *tctx, bool cancel_all); + +void io_cmd_cache_free(const void *entry); |