]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
virtio: blk/scsi: use block layer helpers to calculate num of queues
authorDaniel Wagner <wagi@kernel.org>
Tue, 17 Jun 2025 13:43:27 +0000 (15:43 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Jul 2025 16:24:19 +0000 (10:24 -0600)
commit0a50ed0574ffe853f15c3430794b5439b2e6150a
tree7438628cdd13ae16ae0cbc0b1ba9ac3fe017530a
parent94970cfb5f10ea381df8c402d36c5023765599da
virtio: blk/scsi: use block layer helpers to calculate num of queues

The calculation of the upper limit for queues does not depend solely on
the number of possible CPUs; for example, the isolcpus kernel
command-line option must also be considered.

To account for this, the block layer provides a helper function to
retrieve the maximum number of queues. Use it to set an appropriate
upper queue number limit.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20250617-isolcpus-queue-counters-v1-5-13923686b54b@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/virtio_blk.c
drivers/scsi/virtio_scsi.c