Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1a734c2b authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar Committed by Gerrit - the friendly Code Review server
Browse files

sched/fair: dont run energy calculation unless necessary



The placement code calls find_best_target() to find the next cpu,
and if possible a backup cpu. After that it does an energy
evaluation between next, backup and prev cpu.

When find_best_target() finds the next or backup the same
as prev, we unnecessarily account for the same cpu twice
in energy evaluation.

So, drop the backup if its same as prev. If the next cpu
is same as the prev, make backup the next candidate.

Also replace task_cpu() with stack prev_cpu variable.

Change-Id: Ia2dc0c1b059ad515d99e7d66556795b24d30629c
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
[clingutla@codeaurora.org: Resolved merge conflicts, and include
 backup cpu check with target cpu.]
Signed-off-by: default avatarLingutla Chandrasekhar <clingutla@codeaurora.org>
parent 2dba40ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment