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

Commit 1cb8a6f4 authored by Syed Rameez Mustafa's avatar Syed Rameez Mustafa Committed by Matt Wagantall
Browse files

sched: always do idle balance with a NEWLY_IDLE idle environment



With the introduction of energy aware scheduling, if idle_balance() is
to be called on behalf of a different CPU which is idle, CPU_IDLE is
used in the environment for load_balance(). This, however, introduces
subtle differences in load calculations and policies in the load
balancer. For example there are restrictions on which CPU is permitted
to do load balancing during !CPU_NEWLY_IDLE (see update_sg_lb_stats)
and find_busiest_group() uses different criteria to detect the
presence of a busy group. There are other differences as well. Revert
back to using the NEWLY_IDLE environment irrespective of whether
idle_balance() is called for the newly idle CPU or on behalf on
already existing idle CPU. This will ensure that task movement logic
while doing idle balance remains unaffected.

Change-Id: I388b0ad9a38ca550667895c8ed19628f3d25ce1a
Signed-off-by: default avatarSyed Rameez Mustafa <rameezmustafa@codeaurora.org>
parent cb42bcbe
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -8308,10 +8308,7 @@ static int idle_balance(struct rq *this_rq)
			t0 = sched_clock_cpu(balance_cpu);

			pulled_task = load_balance(balance_cpu, balance_rq,
						   sd,
						   (this_cpu == balance_cpu ?
						    CPU_NEWLY_IDLE :
						    CPU_IDLE),
						   sd, CPU_NEWLY_IDLE,
						   &continue_balancing);

			domain_cost = sched_clock_cpu(balance_cpu) - t0;