linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched/fair: fix statistics for find_idlest_group()
@ 2020-02-18 14:45 Vincent Guittot
  2020-02-18 15:09 ` Peter Zijlstra
  2020-02-27  9:12 ` [tip: sched/urgent] sched/fair: Fix " tip-bot2 for Vincent Guittot
  0 siblings, 2 replies; 3+ messages in thread
From: Vincent Guittot @ 2020-02-18 14:45 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, dietmar.eggemann, rostedt, bsegall,
	mgorman, linux-kernel
  Cc: pauld, parth, valentin.schneider, hdanton, quentin.perret,
	srikar, riel, Morten.Rasmussen, 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()")
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
 kernel/sched/fair.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a7e11b1bb64c..643ed6d8b8ff 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -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);
 
 	/*
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sched/fair: fix statistics for find_idlest_group()
  2020-02-18 14:45 [PATCH] sched/fair: fix statistics for find_idlest_group() Vincent Guittot
@ 2020-02-18 15:09 ` Peter Zijlstra
  2020-02-27  9:12 ` [tip: sched/urgent] sched/fair: Fix " tip-bot2 for Vincent Guittot
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2020-02-18 15:09 UTC (permalink / raw)
  To: Vincent Guittot
  Cc: mingo, juri.lelli, dietmar.eggemann, rostedt, bsegall, mgorman,
	linux-kernel, pauld, parth, valentin.schneider, hdanton,
	quentin.perret, srikar, riel, Morten.Rasmussen

On Tue, Feb 18, 2020 at 03:45:34PM +0100, Vincent Guittot wrote:
> 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 <vincent.guittot@linaro.org>

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: sched/urgent] sched/fair: Fix statistics for find_idlest_group()
  2020-02-18 14:45 [PATCH] sched/fair: fix statistics for find_idlest_group() Vincent Guittot
  2020-02-18 15:09 ` Peter Zijlstra
@ 2020-02-27  9:12 ` tip-bot2 for Vincent Guittot
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Vincent Guittot @ 2020-02-27  9:12 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Vincent Guittot, Ingo Molnar, Peter Zijlstra, Mel Gorman, x86, LKML

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 <vincent.guittot@linaro.org>
AuthorDate:    Tue, 18 Feb 2020 15:45:34 +01:00
Committer:     Ingo Molnar <mingo@kernel.org>
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.

Fixes: 57abff067a08 ("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
---
 kernel/sched/fair.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 3c8a379..c1217bf 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);
 
 	/*

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-27  9:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 14:45 [PATCH] sched/fair: fix statistics for find_idlest_group() Vincent Guittot
2020-02-18 15:09 ` Peter Zijlstra
2020-02-27  9:12 ` [tip: sched/urgent] sched/fair: Fix " tip-bot2 for Vincent Guittot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).