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

Commit bbebfed7 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

sched/fair: improve big task placement



When a task that should run on the highest cluster is being placed and
if all the cpus in the highest cluster are either not available or
cannot accommodate this task, we could end up placing this task on
the smallest cpu.

Instead place this task on the most spare capacity cpu.

Change-Id: I10256918a7d6f016e7fce31af61c314b8784e22d
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 434dab22
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -7286,6 +7286,13 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu,
				continue;
			}

			/*
			 * Skip processing placement further if we are visiting
			 * cpus with lower capacity than start cpu
			 */
			if (capacity_orig < capacity_orig_of(cpu))
				continue;

			/*
			 * Case B) Non latency sensitive tasks on IDLE CPUs.
			 *