lkml.org 
[lkml]   [2006]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Regression seen for patch "sched:dont decrease idle sleep avg"
Date
On Thursday 18 May 2006 22:59, Mike Galbraith wrote:
> On Thu, 2006-05-18 at 09:04 +0200, Mike Galbraith wrote:
> > OK, after some brief testing, I think this is a step in the right
> > direct, but there is another problem. In the case where the queue isn't
> > empty, the stated intent is utterly defeated by the on runqueue bonus.
>
> The overly verbose one liner below could serve as a minimal ~fix.
>
> Prevent the on-runqueue bonus logic from defeating the idle sleep logic.
>
> Signed-off-by: Mike Galbraith <efault@gmx.de>
>
> --- linux-2.6.17-rc4-mm1/kernel/sched.c.org 2006-05-18 08:38:13.000000000
> +0200 +++ linux-2.6.17-rc4-mm1/kernel/sched.c 2006-05-18 14:47:09.000000000
> +0200 @@ -917,6 +917,16 @@ static int recalc_task_prio(task_t *p, u
> * with one single large enough sleep.
> */
> p->sleep_avg = ceiling;
> + /*
> + * Using INTERACTIVE_SLEEP() as a ceiling places a
> + * nice(0) task 1ms sleep away from promotion, and
> + * gives it 700ms to round-robin with no chance of
> + * being demoted. This is more than generous, so
> + * mark this sleep as non-interactive to prevent the
> + * on-runqueue bonus logic from intervening should
> + * this task not receive cpu immediately.
> + */
> + p->sleep_type = SLEEP_NONINTERACTIVE;
> } else {
> /*
> * Tasks waking from uninterruptible sleep are

Yes I like it. It's consistent with the intent and lacking from the current
design.

Ok I'll wrap this and Ken's patches all together and ask for them to be pushed
upstream. I'd go so far as to say they are mostly obvious comment and
bugfixes for the code that is already going into 2.6.17 and we should short
circuit them to mainline if it's ok with Ingo and Akpm.

--
-ck
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-19 03:14    [W:0.058 / U:14.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site