mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
sched/fair: reduce no-hz idle balance for energy aware systems
We are kicking no-hz idle balance when the CPU has two tasks. It should be done only when the CPU is overutilized on energy aware systems. This approach seems to be causing more number of wakeups on HZ=250 systems compared to HZ=100. Revisit the no-hz idle scheme and only send the IPI if and when it is necessary. Change-Id: I82e58a2aa3b6508c86d05c93c9fb7fe6dfbde500 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> [satyap@codeaurora.org: fix trivial merge conflicts] Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
This commit is contained in:
parent
2fdb6c48bd
commit
eb329acdbb
1 changed files with 16 additions and 5 deletions
|
|
@ -10615,7 +10615,7 @@ static inline int find_energy_aware_new_ilb(void)
|
|||
int ilb = nr_cpu_ids;
|
||||
struct sched_domain *sd;
|
||||
int cpu = raw_smp_processor_id();
|
||||
cpumask_t avail_cpus, tmp_cpus;
|
||||
cpumask_t idle_cpus, tmp_cpus;
|
||||
struct sched_group *sg;
|
||||
unsigned long ref_cap = capacity_orig_of(cpu);
|
||||
unsigned long best_cap = 0, best_cap_cpu = -1;
|
||||
|
|
@ -10625,16 +10625,16 @@ static inline int find_energy_aware_new_ilb(void)
|
|||
if (!sd)
|
||||
goto out;
|
||||
|
||||
cpumask_and(&avail_cpus, nohz.idle_cpus_mask,
|
||||
cpumask_and(&idle_cpus, nohz.idle_cpus_mask,
|
||||
housekeeping_cpumask(HK_FLAG_MISC));
|
||||
cpumask_andnot(&avail_cpus, &avail_cpus, cpu_isolated_mask);
|
||||
cpumask_andnot(&idle_cpus, &idle_cpus, cpu_isolated_mask);
|
||||
|
||||
sg = sd->groups;
|
||||
do {
|
||||
int i;
|
||||
unsigned long cap;
|
||||
|
||||
cpumask_and(&tmp_cpus, &avail_cpus, sched_group_span(sg));
|
||||
cpumask_and(&tmp_cpus, &idle_cpus, sched_group_span(sg));
|
||||
i = cpumask_first(&tmp_cpus);
|
||||
|
||||
/* This sg did not have any idle CPUs */
|
||||
|
|
@ -10649,7 +10649,18 @@ static inline int find_energy_aware_new_ilb(void)
|
|||
break;
|
||||
}
|
||||
|
||||
/* The back up CPU is selected from the best capacity CPUs */
|
||||
/*
|
||||
* When there are no idle CPUs in the same capacity group,
|
||||
* we find the next best capacity CPU.
|
||||
*/
|
||||
if (best_cap > ref_cap) {
|
||||
if (cap > ref_cap && cap < best_cap) {
|
||||
best_cap = cap;
|
||||
best_cap_cpu = i;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cap > best_cap) {
|
||||
best_cap = cap;
|
||||
best_cap_cpu = i;
|
||||
|
|
|
|||
Loading…
Reference in a new issue