[PATCH 0/5] blk: introduce block layer helpers to calculate num of queues

From: Daniel Wagner
Date: Tue Jun 17 2025 - 09:45:30 EST


I am still working on the change request for the "blk: honor isolcpus
configuration" series [1]. Teaching group_cpus_evenly to use the
housekeeping mask depending on the context is not a trivial change.

The first part of the series has already been reviewed and doesn't
contain any controversial changes, so let's get them processed
independely.

[1] https://patch.msgid.link/20250424-isolcpus-io-queues-v6-0-9a53a870ca1f@xxxxxxxxxx

Signed-off-by: Daniel Wagner <wagi@xxxxxxxxxx>
---
Changes in from https://patch.msgid.link/20250424-isolcpus-io-queues-v6-0-9a53a870ca1f@xxxxxxxxxx
- limit number of allocated masks to the max allocated number of masks
- commit message improvements
- typo fixes
- formatting fixed
- collected tags

---
Daniel Wagner (5):
lib/group_cpus: Let group_cpu_evenly() return the number of initialized masks
blk-mq: add number of queue calc helper
nvme-pci: use block layer helpers to calculate num of queues
scsi: use block layer helpers to calculate num of queues
virtio: blk/scsi: use block layer helpers to calculate num of queues

block/blk-mq-cpumap.c | 46 +++++++++++++++++++++++++++++--
drivers/block/virtio_blk.c | 5 ++--
drivers/nvme/host/pci.c | 5 ++--
drivers/scsi/megaraid/megaraid_sas_base.c | 15 ++++++----
drivers/scsi/qla2xxx/qla_isr.c | 10 +++----
drivers/scsi/smartpqi/smartpqi_init.c | 5 ++--
drivers/scsi/virtio_scsi.c | 1 +
drivers/virtio/virtio_vdpa.c | 9 +++---
fs/fuse/virtio_fs.c | 6 ++--
include/linux/blk-mq.h | 2 ++
include/linux/group_cpus.h | 2 +-
kernel/irq/affinity.c | 11 ++++----
lib/group_cpus.c | 16 +++++------
13 files changed, 89 insertions(+), 44 deletions(-)
---
base-commit: e04c78d86a9699d136910cfc0bdcf01087e3267e
change-id: 20250617-isolcpus-queue-counters-42ba0ee77390

Best regards,
--
Daniel Wagner <wagi@xxxxxxxxxx>