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

Commit 94755936 authored by Vikram Mulukutla's avatar Vikram Mulukutla Committed by Satya Durga Srinivasu Prabhala
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>
[satyap@codeaurora.org: Port to 4.19 and fix merge conflicts]
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent 901863ad
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -6372,6 +6372,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 (available_idle_cpu(cpu))
			break;
	}
@@ -6392,13 +6394,14 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)
	struct sched_domain *sd;
	int i, recent_used_cpu;

	if (available_idle_cpu(target))
	if (available_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) && available_idle_cpu(prev))
	if (prev != target && cpus_share_cache(prev, target) &&
			available_idle_cpu(prev) && !cpu_isolated(prev))
		return prev;

	/* Check a recently used CPU as a potential idle candidate: */