On Fri, Jul 04, 2025 at 11:00:56AM +0200, Daniel Wagner wrote: > > I'm no expert on the housekeeping stuff, but why isn't the > > housekeeping_enabled check done in housekeeping_cpumask directly so > > that the drivers could use housekeeping_cpumask without a blk-mq > > wrapper? > > Yes, housekeeping_cpumask will return cpu_possible_mask when housekeping > is disabled. Though some drivers want cpu_online_mask instead. If all > drivers would agree on one version of the mask it should allow to drop > to these helpers (maybe we the houskeeping API needs to be extended then > though)
Drivers don't get cpu hotplug notifications, so cpu_possible_mask is the only valid answer right now. That could change if we ever implement notifications to the drivers. > This is also what Hannes brought up. If the number of supported hardware > queues for a device is less than cpu_possible_mask, it really makes > sense to distribute the hardware queues only between the online cpus. I > think the only two drivers which are interested in the cpu_possible_mask > are nvme-pci and virtio. That's the only two drivers that get it right :(