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

Commit b0df0e53 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Satya Durga Srinivasu Prabhala
Browse files

sched/fair: Consider task affinity while skipping a sched group



When placement boost is active, the CPUs in the highest capacity
sched group are only considered for task placement. The
find_best_target()->skip_sg() skips lower capacity sched groups.
This is a problem for the tasks whose affinity allows them to run
only on lower capacity sched group.

Change-Id: I935ff3dc3daa98c636885312216a68323aac3ce1
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
[satyap@codeaurora.org: trivial changes to fix compilations issues]
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent 95f3735c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -7053,6 +7053,13 @@ static inline bool skip_sg(struct task_struct *p, struct sched_group *sg,
	if (!sg->group_weight)
		return true;

	/*
	 * Don't skip a group if a task affinity allows it
	 * to run only on that group.
	 */
	if (cpumask_subset(&p->cpus_allowed, sched_group_span(sg)))
		return false;

	if (!task_fits_max(p, fcpu))
		return true;