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

Commit d39adbbc authored by Lingutla Chandrasekhar's avatar Lingutla Chandrasekhar
Browse files

sched: fair: Stop running idle_balance on active migration kick



Newly_idle/idle cpu does load balance for each domain level,
if the idle cpu kicks active migration on busiest cpu at one level,
it still continues to do load balance at higher level. This behavior may
cause more packing on the current load balancing cpu, as it can pull tasks
from next domain level busiest cpu, as well as active migration would
moves task from busiest cpu.

Currently, it stops load balance if it directly pulled tasks
(pulled_task > 0), extend it to active migration as well.

Change-Id: I1dfa82590a382a06467827d05581ceaac84d5e1f
Signed-off-by: default avatarLingutla Chandrasekhar <clingutla@codeaurora.org>
parent 8ca6d749
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -11474,10 +11474,11 @@ static int idle_balance(struct rq *this_rq, struct rq_flags *rf)
		update_next_balance(sd, &next_balance);

		/*
		 * Stop searching for tasks to pull if there are
		 * now runnable tasks on this rq.
		 * Stop searching for tasks to pull if there are now runnable
		 * tasks on this rq or if active migration kicked in.
		 */
		if (pulled_task || this_rq->nr_running > 0)
		if (pulled_task || this_rq->nr_running > 0 ||
		    !continue_balancing)
			break;
	}
	rcu_read_unlock();