diff options
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index aaa0dfa29d53..6d73bdbb2d40 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7687,6 +7687,15 @@ static int detach_tasks(struct lb_env *env) lockdep_assert_held(&env->src_rq->lock); + /* + * Source run queue has been emptied by another CPU, clear + * LBF_ALL_PINNED flag as we will not test any task. + */ + if (env->src_rq->nr_running <= 1) { + env->flags &= ~LBF_ALL_PINNED; + return 0; + } + if (env->imbalance <= 0) return 0; |