Skip to content

Commit 5125535

Browse files
calebsanderaxboe
authored andcommitted
ublk: don't dereference ublk_queue in ublk_ch_uring_cmd_local()
For ublk servers with many ublk queues, accessing the ublk_queue to handle a ublk command is a frequent cache miss. Get the queue depth from the ublk_device instead, which is accessed just before. 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 d74a383 commit 5125535

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
@@ -2333,7 +2333,7 @@ static int ublk_ch_uring_cmd_local(struct io_uring_cmd *cmd,
23332333

23342334
ubq = ublk_get_queue(ub, q_id);
23352335

2336-
if (tag >= ubq->q_depth)
2336+
if (tag >= ub->dev_info.queue_depth)
23372337
goto out;
23382338

23392339
io = &ubq->ios[tag];

0 commit comments

Comments
 (0)