Re: [PATCH v7 08/14] sched/topology: Disable EAS on inappropriate platforms

Peter Zijlstra
2018-10-03T16:27:19Z

On Wed, Sep 12, 2018 at 10:13:03AM +0100, Quentin Perret wrote:
> @@ -288,6 +321,21 @@ static void build_perf_domains(const struct cpumask *cpu_map)
> goto free;
> tmp->next = pd;
> pd = tmp;
> +
> + /*
> + * Count performance domains and capacity states for the
> + * complexity check.
> + */
> + nr_pd++;
> + nr_cs += em_pd_nr_cap_states(pd->obj);
> + }
> +
> + /* Bail out if the Energy Model complexity is too high. */
> + if (nr_pd * (nr_cs + nr_cpus) > EM_MAX_COMPLEXITY) {
> + if (sched_debug())
> + pr_info("rd %*pbl: EM complexity is too high\n ",
> + cpumask_pr_args(cpu_map));
> + goto free;
> }

I would make than an unconditional WARN, we do not really expect that to
trigger, but then it does, we really don't want to hide it.