diff options
| author | Chris Redpath <chris.redpath@arm.com> | 2018-05-30 13:16:41 +0100 |
|---|---|---|
| committer | Georg Veichtlbauer <georg@vware.at> | 2023-07-27 17:52:37 +0200 |
| commit | d9c142bb8924559c277335822d2d64d0c1b3fc0b (patch) | |
| tree | 4e09c6a5c5be7789d7fcceb2260ebec722a3004d /kernel | |
| parent | 86cd107cd467cbba7f260dfdddb189dc07366a96 (diff) | |
FROMLIST: sched/fair: Don't move tasks to lower capacity cpus unless necessary
When lower capacity CPUs are load balancing and considering to pull
something from a higher capacity group, we should not pull tasks from a
cpu with only one task running as this is guaranteed to impede progress
for that task. If there is more than one task running, load balance in
the higher capacity group would have already made any possible moves to
resolve imbalance and we should make better use of system compute
capacity by moving a task if we still have more than one running.
cc: Ingo Molnar <mingo@redhat.com>
cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>
[from https://lore.kernel.org/lkml/1530699470-29808-11-git-send-email-morten.rasmussen@arm.com/]
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Change-Id: Ib86570abdd453a51be885b086c8d80be2773a6f2
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/fair.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ca08e59c36a8..31d0cfa0ea6b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -10407,6 +10407,17 @@ static struct rq *find_busiest_queue(struct lb_env *env, capacity = capacity_of(i); + /* + * For ASYM_CPUCAPACITY domains, don't pick a cpu that could + * eventually lead to active_balancing high->low capacity. + * Higher per-cpu capacity is considered better than balancing + * average load. + */ + if (env->sd->flags & SD_ASYM_CPUCAPACITY && + capacity_of(env->dst_cpu) < capacity && + rq->nr_running == 1) + continue; + wl = weighted_cpuload(i); /* |
