Messages in this thread | | | From | Josh Don <> | Date | Wed, 11 Oct 2023 16:55:35 -0700 | Subject | Re: [PATCH RFC] cpumask: Randomly distribute the tasks within affinity mask |
| |
Hey Peter,
> +static struct cpumask *root_domain_allowed(struct cpumask *newmask, > + struct cpumask *scratch, > + struct cpumask *valid) > +{ > + struct root_domain *rd; > + struct cpumask *mask; > + struct rq *rq; > + > + int first = cpumask_first_and(newmask, valid); > + if (first >= nr_cpu_ids) > + return NULL;
This picks the first arbitrarily, but isn't it possible for the mask to span both isolated and non-isolated cpus? In which case, the rest of this just boils down to chance (ie. whatever the span happens to be for the first cpu here)?
| |