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:Abhijeet Dharmapurikar <adharmap@codeaurora.org> [clingutla@codeaurora.org: Resolved merge conflicts, and include backup cpu check with target cpu.] Signed-off-by:
Lingutla Chandrasekhar <clingutla@codeaurora.org>
Loading
Please register or sign in to comment