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

Commit f2bf4b01 authored by Vikram Mulukutla's avatar Vikram Mulukutla Committed by Joonwoo Park
Browse files

sched: fair: Ignore energy-diff calculations for colocated tasks



Colocation is a performance-centric feature that drives tasks
to their preferred clusters in the wakeup cpu selection logic.
Let's not bother with energy-diff for these tasks even if the
previous CPU was not in the preferred cluster. This avoids
the overhead of the energy-diff calculation as well as the
potential failure to select a CPU in the preferred cluster.

Change-Id: I485905449175953b234f1efdb6817aab31b6de1e
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent 1d11bd02
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -6911,12 +6911,9 @@ static int energy_aware_wake_cpu(struct task_struct *p, int target, int sync)
		};

		/*
		 * If the previous CPU does not belong to the preferred_cluster,
		 * there is no need to evaluate energy difference. We want
		 * to migrate the task to the preferred cluster.
		 *
		 * We always want to migrate the task to the preferred cluster.
		 */
		if (rtg_target && !cpumask_test_cpu(eenv.src_cpu, rtg_target)) {
		if (rtg_target) {
			trace_sched_task_util_colocated(p, task_cpu(p),
						task_util(p),
						cpumask_first(rtg_target),