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

Commit 1e4b38eb authored by Vikram Mulukutla's avatar Vikram Mulukutla Committed by Gerrit - the friendly Code Review server
Browse files

sched: fair: Work in isolation conditions into SMP placement path



This snapshot is taken from msm-4.9 as of commit a81181397b9229d
(Merge "msm: vidc: add P010 color format in govenors").

Change-Id: Ifc22b1295d4d89c219f3b2cb7a238ef31865301d
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent 12f679ce
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -6752,6 +6752,8 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t
			return -1;
		if (!cpumask_test_cpu(cpu, &p->cpus_allowed))
			continue;
		if (cpu_isolated(cpu))
			continue;
		if (idle_cpu(cpu))
			break;
	}
@@ -6772,13 +6774,14 @@ static inline int __select_idle_sibling(struct task_struct *p, int prev, int tar
	struct sched_domain *sd;
	int i;

	if (idle_cpu(target))
	if (idle_cpu(target) && !cpu_isolated(target))
		return target;

	/*
	 * If the previous cpu is cache affine and idle, don't be stupid.
	 */
	if (prev != target && cpus_share_cache(prev, target) && idle_cpu(prev))
	if (prev != target && cpus_share_cache(prev, target) &&
				idle_cpu(prev) && !cpu_isolated(i))
		return prev;

	sd = rcu_dereference(per_cpu(sd_llc, target));
@@ -6828,6 +6831,9 @@ static inline int select_idle_sibling_cstate_aware(struct task_struct *p, int pr
				if (!idle_cpu(i))
					goto next;

				if (cpu_isolated(i))
					continue;

				/* figure out if the task can fit here at all */
				new_usage = boosted_task_util(p);
				capacity_orig = capacity_orig_of(i);