Re: [PATCH v6 7/9] lib/group_cpus: honor housekeeping config when grouping CPUs

Daniel Wagner
2025-05-14T17:49:27Z

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.