[PATCH v6 7/9] lib/group_cpus: honor housekeeping config when grouping CPUs
Daniel Wagner
dwagner at suse.de
Wed May 14 10:49:20 PDT 2025
On Tue, May 06, 2025 at 02:18:32PM -0400, Waiman Long wrote:
> > +static struct cpumask *group_mask_cpus_evenly(unsigned int numgrps,
> > + const struct cpumask *cpu_mask,
> > + unsigned int *nummasks)
> > +struct cpumask *group_cpus_evenly(unsigned int numgrps,
> > + unsigned int *nummasks)
> > +{
> > + if (housekeeping_enabled(HK_TYPE_IO_QUEUE)) {
> > + return group_mask_cpus_evenly(numgrps,
> > + housekeeping_cpumask(HK_TYPE_IO_QUEUE),
> > + nummasks);
> > + }
> > +
> > + return group_possible_cpus_evenly(numgrps, nummasks);
> > +}
>
> The group_cpus_evenly() isn't just used by block I/O. So you can't make it
> check only HK_TYPE_IO_QUEUE here. I will suggest to make it a bit more
> general and add helper function to specify the isolated cpumask the caller
> want to skip.
Okay, in this case I'd make group_mask_cpus_evenly a public interface
and drop the houskeeping bits in group_cpus_evenly.
More information about the Linux-nvme
mailing list