From 15438c5d7e129d10dd4eba3f47f6b95274eebbfe Mon Sep 17 00:00:00 2001 From: "lakkyung.jung" Date: Tue, 13 Mar 2018 18:46:17 +0900 Subject: [PATCH] [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 --- kernel/sched/fair.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.20.1