summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrivatsa Vaddagiri <vatsa@codeaurora.org>2014-11-28 16:07:19 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:01:04 -0700
commitdc66ef50f5572f811e068a78ef99c92782fbfc0d (patch)
treef90f0d11b6f59066ea2a35df38f1e646093ec4b1
parent8e3aa6790ca4ff4744e30720e97c458375a35237 (diff)
sched: Limit LBF_PWR_ACTIVE_BALANCE to within cluster
When higher power (performance) cluster has only one online cpu, we currently let an idle cpu in lower power cluster pull a running task from performance cluster via active balance. Active balance for power-aware reasons is supposed to be restricted to balance within cluster, the check for which is not correctly implemented. Change-Id: I5fba7f01ad80c082a9b27e89b7f6b17a6d9cde14 Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
-rw-r--r--kernel/sched/fair.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1238a6825e7f..3614bb03cab5 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7660,8 +7660,8 @@ group_type group_classify(struct sched_group *group,
/* Mark a less power-efficient CPU as busy only if we haven't
* seen a busy group yet. We want to prioritize spreading
* work over power optimization. */
- if (group->group_weight == 1 && sgs->sum_nr_running &&
- (env->idle != CPU_NOT_IDLE) &&
+ if ((capacity(env->dst_rq) == group_rq_capacity(group)) &&
+ sgs->sum_nr_running && (env->idle != CPU_NOT_IDLE) &&
power_cost_at_freq(env->dst_cpu, 0) <
power_cost_at_freq(cpumask_first(sched_group_cpus(group)), 0)) {
env->flags |= LBF_PWR_ACTIVE_BALANCE;