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

Commit f9641207 authored by Ionela Voinescu's avatar Ionela Voinescu Committed by Quentin Perret
Browse files

sched/fair: use min capacity when evaluating active cpus



When we are calculating what the impact of placing a task on a specific
cpu is, we should include the information that there might be a minimum
capacity imposed upon that cpu which could change the performance and/or
energy cost decisions.

When choosing an active target CPU, favour CPUs that won't end up
running at a high OPP due to a min capacity cap imposed by external
actors.

Change-Id: Ibc3302304345b63107f172b1fc3ffdabc19aa9d4
Signed-off-by: default avatarIonela Voinescu <ionela.voinescu@arm.com>
Signed-off-by: default avatarChris Redpath <chris.redpath@arm.com>
parent 88a968ca
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -6952,10 +6952,11 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu,
				continue;

			/* Favor CPUs with maximum spare capacity */
			if ((capacity_orig - new_util) < target_max_spare_cap)
			if ((capacity_orig - min_capped_util) <
				target_max_spare_cap)
				continue;

			target_max_spare_cap = capacity_orig - new_util;
			target_max_spare_cap = capacity_orig - min_capped_util;
			target_capacity = capacity_orig;
			target_util = new_util;
			target_cpu = i;