Skip to content

Commit ce88e3e

Browse files
calebsanderaxboe
authored andcommitted
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>
1 parent 692cf47 commit ce88e3e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/block/ublk_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,7 @@ ublk_daemon_register_io_buf(struct io_uring_cmd *cmd,
21692169
return ublk_register_io_buf(cmd, ub, ubq, io, index,
21702170
issue_flags);
21712171

2172-
if (!ublk_support_zero_copy(ubq) || !ublk_rq_has_data(req))
2172+
if (!ublk_dev_support_zero_copy(ub) || !ublk_rq_has_data(req))
21732173
return -EINVAL;
21742174

21752175
ret = io_buffer_register_bvec(cmd, req, ublk_io_release, index,

0 commit comments

Comments
 (0)