From: lakkyung.jung Date: Tue, 13 Mar 2018 09:46:17 +0000 (+0900) Subject: [COMMON] sched: fair: Modify condition of group_is_overloaded for idle cpu. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=15438c5d7e129d10dd4eba3f47f6b95274eebbfe;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] sched: fair: Modify condition of group_is_overloaded for idle cpu. If the idle cpu(CPU_NEWLY_IDLE/CPU_IDLE) performs load balancing, the group is considered an overload group if the group has more tasks than it can handle. Change-Id: I25ae84ade65321234ee6e306e7234a238d8e2183 Signed-off-by: lakkyung.jung --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 51940a4d3da9..82dad9ecddb8 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8922,6 +8922,9 @@ group_is_overloaded(struct lb_env *env, struct sg_lb_stats *sgs) if (sgs->sum_nr_running <= sgs->group_weight) return false; + if (env->idle == CPU_NEWLY_IDLE || env->idle == CPU_IDLE) + return true; + if ((sgs->group_capacity * 100) < (sgs->group_util * env->sd->imbalance_pct)) return true;