Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 504e400e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Alistair Delva
Browse files

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



This reverts commit 67de53b1.

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: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I8b1a8909ce8d5eb8d1660586a8706fb6a674d751
parent ede4c83a
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -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);
	}