Revert "ANDROID: sched/fair: Don't balance misfits if it would overload local group"

This reverts commit 67de53b177.

We want to back-out the eas-dev merge that happened in the tree after
5.3-rc1 as those patches "should" all be in Linus's tree now.

This is done to handle the merge conflicts with 5.4-rc1.

Cc: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8b1a8909ce8d5eb8d1660586a8706fb6a674d751
This commit is contained in:
Greg Kroah-Hartman
2019-09-19 20:48:16 +02:00
committed by Alistair Delva
parent ede4c83add
commit 504e400e6c

View File

@@ -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);
}