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

Commit f2d455ad authored by Joonwoo Park's avatar Joonwoo Park
Browse files

sched: WALT: don't bias towards prev CPU when ediff == 0



The target_cpu can be often better choice than previous CPU considering
CPU load.  Always place task on target_cpu rather than previous CPU
when energy cost difference is same.

Change-Id: Id47b5a0c5dbbbbb0d7c43e7dd5f2d958683bc1a7
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
parent 16f1ddde
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -6778,13 +6778,12 @@ static int energy_aware_wake_cpu(struct task_struct *p, int target, int sync)
				return task_cpu(p);
			}
		} else {
			cpu_idle_idx = cpu_rq(task_cpu(p))->nr_running ? -1 :
				       idle_get_state_idx(cpu_rq(task_cpu(p)));
			if (ediff > 0 || (ediff == 0 &&
					  cpu_idle_idx <= min_idle_idx)) {
			if (ediff > 0) {
				trace_sched_task_util_energy_diff(p,
						task_cpu(p), task_util(p),
						target_cpu, task_cpu(p), ediff);
							task_cpu(p),
							task_util(p),
							target_cpu,
							task_cpu(p), ediff);
				return task_cpu(p);
			}
		}