topology.c (31f6a8c0a471be7d7d05c93eac50fcb729e79b9d) topology.c (fa50e2b452c60cff9f4000de5b372a61d6695c26)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Scheduler topology setup/handling methods
4 */
5#include "sched.h"
6
7DEFINE_MUTEX(sched_domains_mutex);
8

--- 314 unchanged lines hidden (view full) ---

323
324/*
325 * EAS can be used on a root domain if it meets all the following conditions:
326 * 1. an Energy Model (EM) is available;
327 * 2. the SD_ASYM_CPUCAPACITY flag is set in the sched_domain hierarchy.
328 * 3. no SMT is detected.
329 * 4. the EM complexity is low enough to keep scheduling overheads low;
330 * 5. schedutil is driving the frequency of all CPUs of the rd;
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Scheduler topology setup/handling methods
4 */
5#include "sched.h"
6
7DEFINE_MUTEX(sched_domains_mutex);
8

--- 314 unchanged lines hidden (view full) ---

323
324/*
325 * EAS can be used on a root domain if it meets all the following conditions:
326 * 1. an Energy Model (EM) is available;
327 * 2. the SD_ASYM_CPUCAPACITY flag is set in the sched_domain hierarchy.
328 * 3. no SMT is detected.
329 * 4. the EM complexity is low enough to keep scheduling overheads low;
330 * 5. schedutil is driving the frequency of all CPUs of the rd;
331 * 6. frequency invariance support is present;
331 *
332 * The complexity of the Energy Model is defined as:
333 *
334 * C = nr_pd * (nr_cpus + nr_ps)
335 *
336 * with parameters defined as:
337 * - nr_pd: the number of performance domains
338 * - nr_cpus: the number of CPUs

--- 32 unchanged lines hidden (view full) ---

371
372 /* EAS definitely does *not* handle SMT */
373 if (sched_smt_active()) {
374 pr_warn("rd %*pbl: Disabling EAS, SMT is not supported\n",
375 cpumask_pr_args(cpu_map));
376 goto free;
377 }
378
332 *
333 * The complexity of the Energy Model is defined as:
334 *
335 * C = nr_pd * (nr_cpus + nr_ps)
336 *
337 * with parameters defined as:
338 * - nr_pd: the number of performance domains
339 * - nr_cpus: the number of CPUs

--- 32 unchanged lines hidden (view full) ---

372
373 /* EAS definitely does *not* handle SMT */
374 if (sched_smt_active()) {
375 pr_warn("rd %*pbl: Disabling EAS, SMT is not supported\n",
376 cpumask_pr_args(cpu_map));
377 goto free;
378 }
379
380 if (!arch_scale_freq_invariant()) {
381 if (sched_debug()) {
382 pr_warn("rd %*pbl: Disabling EAS: frequency-invariant load tracking not yet supported",
383 cpumask_pr_args(cpu_map));
384 }
385 goto free;
386 }
387
379 for_each_cpu(i, cpu_map) {
380 /* Skip already covered CPUs. */
381 if (find_pd(pd, i))
382 continue;
383
384 /* Do not attempt EAS if schedutil is not being used. */
385 policy = cpufreq_cpu_get(i);
386 if (!policy)

--- 1981 unchanged lines hidden ---
388 for_each_cpu(i, cpu_map) {
389 /* Skip already covered CPUs. */
390 if (find_pd(pd, i))
391 continue;
392
393 /* Do not attempt EAS if schedutil is not being used. */
394 policy = cpufreq_cpu_get(i);
395 if (!policy)

--- 1981 unchanged lines hidden ---