From: Vincent Guittot Date: Tue, 18 Feb 2020 14:45:34 +0000 (+0100) Subject: sched/fair: Fix statistics for find_idlest_group() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=289de35984815576793f579ec27248609e75976e;p=linux.git sched/fair: Fix statistics for find_idlest_group() sgs->group_weight is not set while gathering statistics in update_sg_wakeup_stats(). This means that a group can be classified as fully busy with 0 running tasks if utilization is high enough. This path is mainly used for fork and exec. Fixes: 57abff067a08 ("sched/fair: Rework find_idlest_group()") Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Acked-by: Mel Gorman Link: https://lore.kernel.org/r/20200218144534.4564-1-vincent.guittot@linaro.org --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 3c8a379c357e5..c1217bfe5e819 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8337,6 +8337,8 @@ static inline void update_sg_wakeup_stats(struct sched_domain *sd, sgs->group_capacity = group->sgc->capacity; + sgs->group_weight = group->group_weight; + sgs->group_type = group_classify(sd->imbalance_pct, group, sgs); /*