diff options
| author | Vincent Guittot <[email protected]> | 2021-01-07 10:33:23 +0000 |
|---|---|---|
| committer | Peter Zijlstra <[email protected]> | 2021-01-14 10:20:10 +0000 |
| commit | fc488ffd4297f661b3e9d7450dcdb9089a53df7c (patch) | |
| tree | 4fed12010623b18ba872211dd126c429368c2ce0 | |
| parent | sched/fair: Avoid stale CPU util_est value for schedutil in task dequeue (diff) | |
| download | kernel-fc488ffd4297f661b3e9d7450dcdb9089a53df7c.tar.gz kernel-fc488ffd4297f661b3e9d7450dcdb9089a53df7c.zip | |
sched/fair: Skip idle cfs_rq
Don't waste time checking whether an idle cfs_rq could be the busiest
queue. Furthermore, this can end up selecting a cfs_rq with a high load
but being idle in case of migrate_load.
Signed-off-by: Vincent Guittot <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Valentin Schneider <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
| -rw-r--r-- | kernel/sched/fair.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 40d3ebfb5a48..13de7aede74f 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9402,8 +9402,11 @@ static struct rq *find_busiest_queue(struct lb_env *env, if (rt > env->fbq_type) continue; - capacity = capacity_of(i); nr_running = rq->cfs.h_nr_running; + if (!nr_running) + continue; + + capacity = capacity_of(i); /* * For ASYM_CPUCAPACITY domains, don't pick a CPU that could |
