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

Commit 0b013c85 authored by Syed Rameez Mustafa's avatar Syed Rameez Mustafa
Browse files

sched: Stop task migration to busy CPUs due to power active balance



Power active balance should only be invoked when the destination CPU
is calling load balance with either a CPU_IDLE or a CPU_NEWLY_IDLE
environment. We do not want to push tasks towards busy CPUs even they
are a more power efficient place to run that task. This can cause
higher scheduling latencies due to the resulting load imbalance.

Change-Id: I8e0f242338887d189e2fc17acfb63586e7c40839
Signed-off-by: default avatarSyed Rameez Mustafa <rameezmustafa@codeaurora.org>
parent c5564588
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5833,7 +5833,7 @@ static bool update_sd_pick_busiest(struct lb_env *env,
	 * seen a busy group yet. We want to prioritize spreading
	 * work over power optimization. */
	if (!sds->busiest && sg->group_weight == 1 &&
	    sgs->sum_nr_running &&
	    sgs->sum_nr_running && (env->idle != CPU_NOT_IDLE) &&
	    power_cost_at_freq(env->dst_cpu, 0) <
	    power_cost_at_freq(cpumask_first(sched_group_cpus(sg)), 0)) {
		env->flags |= LBF_PWR_ACTIVE_BALANCE;