diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 72529727d57c..057795ca09d6 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8545,18 +8545,8 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s (sds->avg_load - local->avg_load) * local->group_capacity ) / SCHED_CAPACITY_SCALE; - /* Boost imbalance to allow misfit task to be balanced. - * Always do this if we are doing a NEWLY_IDLE balance - * on the assumption that any tasks we have must not be - * long-running (and hence we cannot rely upon load). - * However if we are not idle, we should assume the tasks - * we have are longer running and not override load-based - * calculations above unless we are sure that the local - * group is underutilized. - */ - if (busiest->group_type == group_misfit_task && - (env->idle == CPU_NEWLY_IDLE || - local->sum_nr_running < local->group_weight)) { + /* Boost imbalance to allow misfit task to be balanced. */ + if (busiest->group_type == group_misfit_task) { env->imbalance = max_t(long, env->imbalance, busiest->group_misfit_task_load); }