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

Commit 0e07086f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched/fair: Avoid unnecessary active load balance"

parents 448ea24a 6f701bbe
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -10011,8 +10011,10 @@ static int need_active_balance(struct lb_env *env)
	 * It's worth migrating the task if the src_cpu's capacity is reduced
	 * because of other sched_class or IRQs if more capacity stays
	 * available on dst_cpu.
	 * Avoid pulling the CFS task if it is the only task running.
	 */
	if ((env->idle != CPU_NOT_IDLE) &&
	    (env->src_rq->nr_running > 1) &&
	    (env->src_rq->cfs.h_nr_running == 1)) {
		if ((check_cpu_capacity(env->src_rq, sd)) &&
		    (capacity_of(env->src_cpu)*sd->imbalance_pct < capacity_of(env->dst_cpu)*100))