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

Commit eb486cc9 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched: EAS: skip energy_diff() for placement boosted tasks



We always want to migrate the placement boosted task to the
best CPU. Skip energy_diff() in such scenario.

Change-Id: I2afb9f877d19422744e3351d6580c2ce7188e2fa
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 2d7dfcc3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -881,6 +881,11 @@ DEFINE_EVENT(sched_task_util, sched_task_util_colocated,
	TP_ARGS(p, task_cpu, task_util, nominated_cpu, target_cpu, ediff, need_idle)
);

DEFINE_EVENT(sched_task_util, sched_task_util_boosted,
	TP_PROTO(struct task_struct *p, int task_cpu, unsigned long task_util, int nominated_cpu, int target_cpu, int ediff, bool need_idle),
	TP_ARGS(p, task_cpu, task_util, nominated_cpu, target_cpu, ediff, need_idle)
);

DEFINE_EVENT(sched_task_util, sched_task_util_overutilzed,
	TP_PROTO(struct task_struct *p, int task_cpu, unsigned long task_util, int nominated_cpu, int target_cpu, int ediff, bool need_idle),
	TP_ARGS(p, task_cpu, task_util, nominated_cpu, target_cpu, ediff, need_idle)
+12 −0
Original line number Diff line number Diff line
@@ -7045,6 +7045,18 @@ static int energy_aware_wake_cpu(struct task_struct *p, int target, int sync)
			return target_cpu;
		}

		/*
		 * We always want to migrate the task to the best CPU when
		 * placement boost is active.
		 */
		if (placement_boost) {
			trace_sched_task_util_boosted(p, task_cpu(p),
						task_util(p),
						target_cpu,
						target_cpu, 0, need_idle);
			return target_cpu;
		}

#ifdef CONFIG_SCHED_WALT
		if (walt_disabled || !sysctl_sched_use_walt_cpu_util)
			task_util_boosted = 0;