diff options
| author | Joonwoo Park <joonwoop@codeaurora.org> | 2016-10-21 13:39:31 -0700 |
|---|---|---|
| committer | Joel Fernandes <joelaf@google.com> | 2017-10-19 11:56:50 -0700 |
| commit | 7ab48e4c8d9e0652bd978f3df26c29e64b5ea85a (patch) | |
| tree | 33111b9aaed0e22eec74f282a08c3c16a413bd6c /kernel/sched/fair.c | |
| parent | be832f69a95eb97b4ed0bc8c2b716ee7837ea617 (diff) | |
sched/fair: prevent meaningless active migration
At present need_active_balance() determines whether an active
upmigration is needed by using capacity_of(). A CPU's capacity
may be reduced by RT pressure, and therefore distinguishing
capability differences with capacity_of() may lead to suboptimal
active migrations to less capable CPUs. Use capacity_orig_of
to distinguish differently capable CPUs in addition to
capacity_of(), thus avoiding placing tasks on less capable CPUs
due to instantaneous RT pressure.
Change-Id: I3e1435246a8edc3ad618ef98a34866cfbd8c16a5
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
[markivx: Reworked the commit text a bit]
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Diffstat (limited to 'kernel/sched/fair.c')
| -rw-r--r-- | kernel/sched/fair.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 0f43ece69e8c..d7bea4761a55 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8863,6 +8863,7 @@ static int need_active_balance(struct lb_env *env) } if ((capacity_of(env->src_cpu) < capacity_of(env->dst_cpu)) && + ((capacity_orig_of(env->src_cpu) < capacity_orig_of(env->dst_cpu))) && env->src_rq->cfs.h_nr_running == 1 && cpu_overutilized(env->src_cpu) && !cpu_overutilized(env->dst_cpu)) { |
