sched: EAS: update trg_cpu to backup_cpu if no energy saving for target_cpu
If no energy saving for target_cpu in the calculation of energy_diff(), backup_cpu will be set as the new dst_cpu for the next calculation. At this point, we also need update the new trg_cpu as backup_cpu to make sure the subsequent calculation of energy_diff() is correct. Signed-off-by: Ke Wang <ke.wang@spreadtrum.com>
This commit is contained in:
parent
1cb87c38cb
commit
7d5a251c66
1 changed files with 1 additions and 0 deletions
|
@ -6723,6 +6723,7 @@ static int select_energy_cpu_brute(struct task_struct *p, int prev_cpu, int sync
|
|||
/* No energy saving for target_cpu, try backup */
|
||||
target_cpu = tmp_backup;
|
||||
eenv.dst_cpu = target_cpu;
|
||||
eenv.trg_cpu = target_cpu;
|
||||
if (tmp_backup < 0 ||
|
||||
tmp_backup == prev_cpu ||
|
||||
energy_diff(&eenv) >= 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue