[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070503080706.GA18427@elte.hu>
Date: Thu, 3 May 2007 10:07:06 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Al Boldi <a1426z@...ab.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [patch] CFS scheduler, -v7
* Ingo Molnar <mingo@...e.hu> wrote:
> > [...] but there are still some nice issues.
> >
> > Try running 3 chew.c's, then renicing one to -10, starves others for
> > some seconds while switching prio-level. Now renice it back to 10,
> > it starves for up to 45sec.
>
> ok - to make sure i understood you correctly: does this starvation
> only occur right when you renice it (when switching prio levels), and
> it gets rectified quickly once they get over a few reschedules?
meanwhile i managed to reproduce it by following the exact steps you
described, and i've fixed the bug in my tree. Can you confirm that the
patch below fixes it for you too?
Ingo
----------------->
From: Ingo Molnar <mingo@...e.hu>
Subject: [patch] sched, cfs: fix starvation upon nice level switching
Al Boldi reported the following bug: when switching a CPU-intense task's
nice levels they can get unfairly starved right after the priority level
switching. The bug was that when changing the load_weight the
->wait_runtime value did not get rescaled. So clear wait_runtime when
switching nice levels.
Signed-off-by: Ingo Molnar <mingo@...e.hu>
Index: linux/kernel/sched.c
===================================================================
--- linux.orig/kernel/sched.c
+++ linux/kernel/sched.c
@@ -575,6 +580,7 @@ static void set_load_weight(struct task_
{
p->load_shift = get_load_shift(p);
p->load_weight = 1 << p->load_shift;
+ p->wait_runtime = 0;
}
static inline void
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists