summaryrefslogtreecommitdiff
path: root/kernel/sched
diff options
context:
space:
mode:
authorSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2014-08-26 14:59:08 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:00:33 -0700
commit97b9ad42d98bb3c94823d1ed49d8d7a127e1de30 (patch)
treeb137fea9258181352bd73f57559c3a15d9f09b09 /kernel/sched
parent251081550ff1ac7f602caf55e56c414c8271ddce (diff)
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: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/fair.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 449101a9c2b7..16bfe366e286 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8600,10 +8600,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;