ublk: don't access ublk_queue in ublk_daemon_register_io_buf()

For ublk servers with many ublk queues, accessing the ublk_queue in
ublk_daemon_register_io_buf() is a frequent cache miss. Get the flags
from the ublk_device instead, which is accessed earlier in
ublk_ch_uring_cmd_local().

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Caleb Sander Mateos 2025-09-17 19:49:45 -06:00 committed by Jens Axboe
parent 692cf47e1a
commit ce88e3ef33
1 changed files with 1 additions and 1 deletions

View File

@ -2169,7 +2169,7 @@ ublk_daemon_register_io_buf(struct io_uring_cmd *cmd,
return ublk_register_io_buf(cmd, ub, ubq, io, index,
issue_flags);
if (!ublk_support_zero_copy(ubq) || !ublk_rq_has_data(req))
if (!ublk_dev_support_zero_copy(ub) || !ublk_rq_has_data(req))
return -EINVAL;
ret = io_buffer_register_bvec(cmd, req, ublk_io_release, index,