Commit 692cf47e authored by Caleb Sander Mateos's avatar Caleb Sander Mateos Committed by Jens Axboe
Browse files

ublk: don't access ublk_queue in ublk_register_io_buf()



For ublk servers with many ublk queues, accessing the ublk_queue in
ublk_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: default avatarCaleb Sander Mateos <csander@purestorage.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8a81926e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2133,7 +2133,7 @@ static int ublk_register_io_buf(struct io_uring_cmd *cmd,
	struct request *req;
	int ret;

	if (!ublk_support_zero_copy(ubq))
	if (!ublk_dev_support_zero_copy(ub))
		return -EINVAL;

	req = __ublk_check_and_get_req(ub, ubq, io, 0);