diff options
| author | Jens Axboe <axboe@kernel.dk> | 2025-06-05 11:39:17 -0600 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-06-23 08:59:13 -0600 |
| commit | ecf47d452ced9be162831192fcfb3e9f5cdcde7f (patch) | |
| tree | 4500ed148b99143a3d957692ad45ec9a6d0d38e2 /io_uring/uring_cmd.h | |
| parent | ead21053bf34941c7c7bf680d29b8d15af5406de (diff) | |
io_uring/uring_cmd: implement ->sqe_copy() to avoid unnecessary copies
uring_cmd currently copies the full SQE at prep time, just in case it
needs it to be stable. However, for inline completions or requests that
get queued up on the device side, there's no need to ever copy the SQE.
This is particularly important, as various use cases of uring_cmd will
be using 128b sized SQEs.
Opt in to using ->sqe_copy() to let the core of io_uring decide when to
copy SQEs. This callback will only be called if it is safe to do so.
Reviewed-by: Caleb Sander Mateos <csander@purestorage.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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/uring_cmd.h b/io_uring/uring_cmd.h index e6a5142c890e..a6dad47afc6b 100644 --- a/io_uring/uring_cmd.h +++ b/io_uring/uring_cmd.h @@ -11,6 +11,7 @@ struct io_async_cmd { 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_sqe_copy(struct io_kiocb *req); void io_uring_cmd_cleanup(struct io_kiocb *req); bool io_uring_try_cancel_uring_cmd(struct io_ring_ctx *ctx, |