diff options
author | Caleb Sander Mateos <csander@purestorage.com> | 2025-04-30 16:52:34 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-05-02 09:22:30 -0600 |
commit | 64d1dc522b349a257256f636feb335441cca2571 (patch) | |
tree | aa073cb09b97407a449cdec817efa3f3b129eb38 /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | |
parent | 8ed95b54701a8e946b86ffdeeac8603316e0a59d (diff) |
ublk: store request pointer in ublk_io
A ublk_io is converted to a request in several places in the I/O path by
using blk_mq_tag_to_rq() to look up the (qid, tag) on the ublk device's
tagset. This involves a bunch of dereferences and a tag bounds check.
To make this conversion cheaper, store the request pointer in ublk_io.
Overlap this storage with the io_uring_cmd pointer. This is safe because
the io_uring_cmd pointer is only valid if UBLK_IO_FLAG_ACTIVE is set on
the ublk_io, the request pointer is valid if UBLK_IO_FLAG_OWNED_BY_SRV,
and these flags are mutually exclusive.
Suggested-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250430225234.2676781-10-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c')
0 files changed, 0 insertions, 0 deletions