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

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

sched/fair: Improve the scheduler



This change is for general scheduler improvement.

Change-Id: I0caae436c933656c9a7b5135c6d4a8179be06631
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
[satyap@codeaurora.org: fix trivial merge conflicts]
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent 98ae7e3c
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -8333,7 +8333,8 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
		struct root_domain *rd = env->dst_rq->rd;

		if (rcu_dereference(rd->pd) && !READ_ONCE(rd->overutilized) &&
						env->idle == CPU_NEWLY_IDLE) {
					env->idle == CPU_NEWLY_IDLE &&
					!task_in_related_thread_group(p)) {
			long util_cum_dst, util_cum_src;
			unsigned long demand;

@@ -9782,7 +9783,6 @@ static struct sched_group *find_busiest_group(struct lb_env *env)

		if (rcu_dereference(rd->pd) && !READ_ONCE(rd->overutilized)) {
			int cpu_local, cpu_busiest;
			long util_cum;
			unsigned long capacity_local, capacity_busiest;

			if (env->idle != CPU_NEWLY_IDLE)
@@ -9802,10 +9802,6 @@ static struct sched_group *find_busiest_group(struct lb_env *env)
			} else if (capacity_local == capacity_busiest) {
				if (cpu_rq(cpu_busiest)->nr_running < 2)
					goto out_balanced;

				util_cum = cpu_util_cum(cpu_busiest, 0);
				if (util_cum < cpu_util_cum(cpu_local, 0))
					goto out_balanced;
			}
		}
	}