Skip to contentSkip to conversation

sched/fair: fix statistics for find_idlest_group()

PATCH Applied Vincent Guittot 3 participants 3 messages Feb 18, 2020 – Feb 27, 2020 Scheduler

lore
Share & tools
lore

Vincent Guittot

author maintainer
#0 lore raw

PATCH 1/1 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()")
---
 kernel/sched/fair.c | 2 ++
 1 file changed, 2 insertions(+)
kernel/sched/fair.c +2 -0
index a7e11b1bb64c..643ed6d8b8ff 100644
@@ -8354,6 +8354,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);
 
 	/*
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 8 lines · Vincent Guittot

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()")

Thanks!

#2 lore raw

[tip: sched/urgent] sched/fair: Fix statistics for find_idlest_group()

In reply to Vincent Guittot
The following commit has been merged into the sched/urgent branch of tip:

The following commit has been merged into the sched/urgent branch of tip:

Commit-ID:     289de35984815576793f579ec27248609e75976e
Gitweb:        https://git.kernel.org/tip/289de35984815576793f579ec27248609e75976e
Author:        Vincent Guittot <[email protected]>
AuthorDate:    Tue, 18 Feb 2020 15:45:34 +01:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Thu, 27 Feb 2020 10:08:27 +01:00

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.

---
 kernel/sched/fair.c | 2 ++
 1 file changed, 2 insertions(+)
kernel/sched/fair.c +2 -0
index 3c8a379..c1217bf 100644
@@ -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);
 
 	/*