[COMMON] sched: fair: Modify condition of group_is_overloaded for idle cpu.
authorlakkyung.jung <lakkyung.jung@samsung.com>
Tue, 13 Mar 2018 09:46:17 +0000 (18:46 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:30:46 +0000 (17:30 +0900)
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 <lakkyung.jung@samsung.com>
kernel/sched/fair.c

index 51940a4d3da94a33b3ec989064eba5902ecd9a9e..82dad9ecddb8dd3e22e5caa03bacb1782073b784 100644 (file)
@@ -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;