sched/fair: Depend on sched_asym_cpucapacity for new ilb

We have made the new idle CPU selection for load balance energy
aware. For example, if a silver CPU does not have any misfit
tasks but is overloaded, we have to select a silver CPU not
gold CPU. However, this extra checks are needed only when the
system has asymmetric capacity CPUs. So we should depend on
sched_asym_cpucapacity feature instead of sched_energy_present.
Later patches enable sched_energy_present for SMP systems also.

Change-Id: Ie4fae9d1c17511f15b48b92dd61395d1689e1612
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
Pavankumar Kondeti 2020-06-13 09:53:05 +05:30
commit 4e2c7c3979

View file

@ -10708,11 +10708,15 @@ static inline int find_new_ilb(void)
{
int ilb;
if (sched_energy_enabled())
if (static_branch_likely(&sched_asym_cpucapacity))
return find_energy_aware_new_ilb();
for_each_cpu_and(ilb, nohz.idle_cpus_mask,
housekeeping_cpumask(HK_FLAG_MISC)) {
#ifdef CONFIG_SCHED_WALT
if (cpu_isolated(ilb))
continue;
#endif
if (idle_cpu(ilb))
return ilb;
}