mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
sched/fair: skip 6% energy check when best_energy_cpu is idle
Even though best_energy_cpu is idle and which would consume same amount of energy as prev cpu, due to 6% check with prev cpu, we end up choosing prev cpu over best_energy_cpu for the tasks. This leads to increase in runnables. Choose best_energy_cpu when it is idle and shallowest c-state over prev cpu in such scenarios to avoid runnables. Change-Id: Ib9eee263640bcd43bd80f8f777a8312585991bc5 Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
This commit is contained in:
parent
f27ee2ff0d
commit
3b65363e48
1 changed files with 3 additions and 1 deletions
|
|
@ -7218,7 +7218,9 @@ unlock:
|
|||
* Pick the prev CPU, if best energy CPU can't saves at least 6% of
|
||||
* the energy used by prev_cpu.
|
||||
*/
|
||||
if ((prev_delta != ULONG_MAX) && (best_energy_cpu != prev_cpu) &&
|
||||
if (!(idle_cpu(best_energy_cpu) &&
|
||||
idle_get_state_idx(cpu_rq(best_energy_cpu)) <= 0) &&
|
||||
(prev_delta != ULONG_MAX) && (best_energy_cpu != prev_cpu) &&
|
||||
((prev_delta - best_delta) <= prev_delta >> 4) &&
|
||||
(capacity_orig_of(prev_cpu) <= capacity_orig_of(start_cpu)))
|
||||
best_energy_cpu = prev_cpu;
|
||||
|
|
|
|||
Loading…
Reference in a new issue