diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index c36ea1441717..f0b85220d6e5 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -347,7 +347,14 @@ static bool build_perf_domains(const struct cpumask *cpu_map) if (!sysctl_sched_energy_aware) goto free; - /* EAS is enabled for asymmetric CPU capacity topologies. */ + /* + * EAS gets disabled when there are no asymmetric capacity + * CPUs in the system. For example, all big CPUs are + * hotplugged out on a b.L system. We want EAS enabled + * all the time to get both power and perf benefits. Apply + * this policy when WALT is enabled. + */ +#ifndef CONFIG_SCHED_WALT if (!per_cpu(sd_asym_cpucapacity, cpu)) { if (sched_debug()) { pr_info("rd %*pbl: CPUs do not have asymmetric capacities\n", @@ -355,6 +362,7 @@ static bool build_perf_domains(const struct cpumask *cpu_map) } goto free; } +#endif for_each_cpu(i, cpu_map) { /* Skip already covered CPUs. */ @@ -641,22 +649,6 @@ static void update_top_cache_domain(int cpu) rcu_assign_pointer(per_cpu(sd_asym_packing, cpu), sd); sd = lowest_flag_domain(cpu, SD_ASYM_CPUCAPACITY); - /* - * EAS gets disabled when there are no asymmetric capacity - * CPUs in the system. For example, all big CPUs are - * hotplugged out on a b.L system. We want EAS enabled - * all the time to get both power and perf benefits. So, - * lets assign sd_asym_cpucapacity to the only available - * sched domain. This is also important for a single cluster - * systems which wants to use EAS. - * - * Setting sd_asym_cpucapacity() to a sched domain which - * has all symmetric capacity CPUs is technically incorrect but - * works well for us in getting EAS enabled all the time. - */ - if (!sd) - sd = cpu_rq(cpu)->sd; - rcu_assign_pointer(per_cpu(sd_asym_cpucapacity, cpu), sd); }