public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched: Fix task_h_load calculation
@ 2013-09-14 15:39 Vladimir Davydov
  2013-09-14 18:52 ` Paul Turner
  2013-09-20 13:46 ` [tip:sched/core] sched/balancing: Fix cfs_rq-> " tip-bot for Vladimir Davydov
  0 siblings, 2 replies; 7+ messages in thread
From: Vladimir Davydov @ 2013-09-14 15:39 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar; +Cc: Alex Shi, linux-kernel, devel

Patch a003a2 (sched: Consider runnable load average in move_tasks())
sets all top-level cfs_rqs' h_load to rq->avg.load_avg_contrib, which is
always 0. This mistype leads to all tasks having weight 0 when load
balancing in a cpu-cgroup enabled setup. There obviously should be sum
of weights of all runnable tasks there instead. Fix it.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
---
 kernel/sched/fair.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 9b3fe1c..13abc29 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4242,7 +4242,7 @@ static void update_cfs_rq_h_load(struct cfs_rq *cfs_rq)
 	}
 
 	if (!se) {
-		cfs_rq->h_load = rq->avg.load_avg_contrib;
+		cfs_rq->h_load = cfs_rq->runnable_load_avg;
 		cfs_rq->last_h_load_update = now;
 	}
 
-- 
1.7.10.4


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

end of thread, other threads:[~2013-10-01  2:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-14 15:39 [PATCH] sched: Fix task_h_load calculation Vladimir Davydov
2013-09-14 18:52 ` Paul Turner
2013-09-20 13:46 ` [tip:sched/core] sched/balancing: Fix cfs_rq-> " tip-bot for Vladimir Davydov
2013-09-29  9:47   ` Yuanhan Liu
2013-09-30  8:14     ` Vladimir Davydov
2013-10-01  2:22       ` Yuanhan Liu
2013-10-01  2:32         ` Paul Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox