Skip to content

Commit

Permalink
sched/fair: Fix statistics for find_idlest_group()
Browse files Browse the repository at this point in the history
commit 289de35 upstream.

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: 57abff0 ("sched/fair: Rework find_idlest_group()")
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Link: https://lore.kernel.org/r/20200218144534.4564-1-vincent.guittot@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Vincent Guittot authored and Greg Kroah-Hartman committed Mar 12, 2020
1 parent aa85a1b commit ed4b127
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -8315,6 +8315,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);

/*
Expand Down

0 comments on commit ed4b127

Please sign in to comment.