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

Commit 7293b8b6 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched/fair: Select the least loaded CPU for SMP under sched boost



When placement boost is active, select the least loaded CPU across
all CPU groups/clusters for the best performance.

Change-Id: Ieb0bfcfe6989a4fae4b54cf8ce4d679335585f36
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 0a713078
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -7093,11 +7093,14 @@ static int energy_aware_wake_cpu(struct task_struct *p, int target, int sync)

	/*
	 * If we don't find a CPU that fits this task without
	 * increasing OPP above sched_smp_overlap_capacity,
	 * expand the search to the other groups on a SMP system.
	 */
	if (!sysctl_sched_is_big_little && target_cpu == -1 &&
			min_util_cpu_util_cum > sched_smp_overlap_capacity) {
	 * increasing OPP above sched_smp_overlap_capacity or
	 * when placement boost is active, expand the search to
	 * the other groups on a SMP system.
	 */
	if (!sysctl_sched_is_big_little &&
			(placement_boost == SCHED_BOOST_ON_ALL ||
			(target_cpu == -1 && min_util_cpu_util_cum >
					     sched_smp_overlap_capacity))) {
		if (sg_target->next != start_sg) {
			sg_target = sg_target->next;
			goto next_sg;