On 15/10/2019 17:42, Valentin Schneider wrote: [...] > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c > index c52bc91f882b..a859e5539440 100644 > --- a/kernel/cgroup/cpuset.c > +++ b/kernel/cgroup/cpuset.c > @@ -817,6 +817,11 @@ static int generate_sched_domains(cpumask_var_t **domains, > struct cpuset *a = csa[i]; > int apn = a->pn; > > + if (cpumask_empty(a->effective_cpus)) { > + ndoms--; > + continue; > + } > + > for (j = 0; j < csn; j++) { > struct cpuset *b = csa[j]; > int bpn = b->pn; > @@ -859,6 +864,9 @@ static int generate_sched_domains(cpumask_var_t **domains, > continue; > } > > + if (cpumask_empty(a->effective_cpus)) > + continue; > + Can you not just prevent that a cpuset pointer (cp) is added to the cpuset array (csa[]) in case cpumask_empty(cp->effective_cpus)? @@ -798,9 +800,14 @@ static int generate_sched_domains(cpumask_var_t **domains, cpumask_subset(cp->cpus_allowed, top_cpuset.effective_cpus)) continue; - if (is_sched_load_balance(cp)) + if (is_sched_load_balance(cp) && !cpumask_empty(cp->effective_cpus)) csa[csn++] = cp; > dp = doms[nslot]; > > if (nslot == ndoms) { [...]