sched: tg->se->load should be initialised to tg->shares
authorYong Zhang <yong.zhang0@gmail.com>
Mon, 24 Jan 2011 00:59:17 +0000 (00:59 +0000)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 28 Mar 2011 13:53:10 +0000 (06:53 -0700)
Michael reported that when enable autogroup on UP, system
responsiveness becomes very bad.
Because in init_tg_cfs_entry() we initialise se->load
to 0 instead of tg->shares, in the end we have 0-weight
sched entity on rq, then lead to misbehavior.

Reported-by: Michael Witten <mfwitten@gmail.com>
Reported-by: Christian Kujau <christian@nerdbynature.de>
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

kernel/sched.c

index c164920..1cc9328 100644 (file)
@@ -7858,7 +7858,7 @@ static void init_tg_cfs_entry(struct task_group *tg, struct cfs_rq *cfs_rq,
                se->cfs_rq = parent->my_q;
 
        se->my_q = cfs_rq;
-       update_load_set(&se->load, 0);
+       update_load_set(&se->load, tg->shares);
        se->parent = parent;
 }
 #endif