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

Commit 98d72cd5 authored by Lingutla Chandrasekhar's avatar Lingutla Chandrasekhar Committed by Gerrit - the friendly Code Review server
Browse files

sched: rt: Fix double accounting of cpu util in task placement decision



In RT energy aware task placement, cpu utilization is double accounted
to check whether cpu would be overutilized for given task or not.

Fix the double accounting the cpu util.

Change-Id: Id51dd6c952126b870942746c0408fa387ec3bfb1
Signed-off-by: default avatarLingutla Chandrasekhar <clingutla@codeaurora.org>
parent 1fa28c49
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1852,11 +1852,11 @@ static int rt_energy_aware_wake_cpu(struct task_struct *task)
			if (sched_cpu_high_irqload(cpu))
				continue;

			util = cpu_util(cpu);

			if (__cpu_overutilized(cpu, util + tutil))
			if (__cpu_overutilized(cpu, tutil))
				continue;

			util = cpu_util(cpu);

			/* Find the least loaded CPU */
			if (util > best_cpu_util)
				continue;