lkml.org 
[lkml]   [2011]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 'autogroup' sched code KILLING responsiveness
On Sun, Jan 23, 2011 at 02:50:08AM -0800, Christian Kujau wrote:
> On Fri, 21 Jan 2011 at 10:20, Michael Witten wrote:
> > With that code in place, a resource-intensive activity (such as
> > compiling the Linux kernel) causes my computer to become
> > unresponsive for many seconds at a time; the entire screen
> > does not refresh, typed keys are dropped or are handled very
> > late, etc (even in Linux's plain virtual consoles).
>
> Unfortunately, I'd like to add a "me too". 2.6.38-rc1 behaves fine, but
> with CONFIG_SCHED_AUTOGROUP=y and doing I/O and CPU intensive work (git
> prune/git repack on a Linux git tree), system load goes up to ~13 and
> becomes unresponse for some time too. This even happens when I start the
> jobs with nice -n10.
>
> Without CONFIG_SCHED_AUTOGROUP enabled and doing the same work,
> systemload goes up to 1 or maybe 2.
>
> I'm on UP as well (PowerPC G4), disabling CONFIG_SCHED_AUTOGROUP helps
> here too.

I think below patch will fix it.

---
From: Yong Zhang <yong.zhang0@gmail.com>
Subject: [PATCH] sched: tg->se->load should be initialised to tg->shares
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>
---
kernel/sched.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 18d38e4..3ec2c6c 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7857,7 +7857,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
--
1.7.1



\
 
 \ /
  Last update: 2011-01-23 15:57    [from the cache]
©2003-2011 Jasper Spaans