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

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

Merge "sched: Avoid pulling all tasks from a CPU during load balance"

parents 3c658968 7b0a1a7e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -7218,6 +7218,14 @@ more_balance:
		local_irq_save(flags);
		double_rq_lock(env.dst_rq, busiest);

		/* The world might have changed. Validate assumptions */
		if (busiest->nr_running <= 1) {
			double_rq_unlock(env.dst_rq, busiest);
			local_irq_restore(flags);
			env.flags &= ~LBF_ALL_PINNED;
			goto no_move;
		}

		/*
		 * cur_ld_moved - load moved in current iteration
		 * ld_moved     - cumulative load moved across iterations
@@ -7287,6 +7295,7 @@ more_balance:
		}
	}

no_move:
	if (!ld_moved) {
		if (!(env.flags & (LBF_PWR_ACTIVE_BALANCE | LBF_SCHED_BOOST)))
			schedstat_inc(sd, lb_failed[idle]);