Re: [PATCH v3 1/2] sched/topology: Don't try to build empty sched domains

From: Valentin Schneider
Date: Wed Oct 23 2019 - 10:12:34 EST


On 23/10/2019 12:46, Dietmar Eggemann wrote:
> 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;
>

I think you're right. Let me give it a shot and I'll spin a v4 with this +
better changelog for the key.

>> dp = doms[nslot];
>>
>> if (nslot == ndoms) {
>
> [...]
>