From: Mike Galbraith <efault@gmx.de>
To: Charles Baylis <cb-lkml@fish.zetnet.co.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.5.64-mm6, a new test case for scheduler interactivity problems
Date: Fri, 14 Mar 2003 15:34:44 +0100 [thread overview]
Message-ID: <5.2.0.9.2.20030314152115.00ce76b0@pop.gmx.net> (raw)
In-Reply-To: <200303132201.02278.cb-lkml@fish.zetnet.co.uk>
[-- Attachment #1: Type: text/plain, Size: 1462 bytes --]
At 10:01 PM 3/13/2003 +0000, Charles Baylis wrote:
>Hi all
>
>I've just installed 2.5.64-mm6, and I've tried out the new improved
>scheduler and it's definately not there yet. I can easily cause ogg
>playback to skip (for example) by changing virtual desktop in windowmaker
>to busy konqueror window. X is not reniced (has a nice level of 0)
>
>It's several months since I last ran a 2.4 kernel on this machine, but as I
>remember it did not skip when changing desktops.
>
>My experience suggests that skips occur when more than one interactive task
>starts to become a CPU hog, for example X and konqueror can be idle for
>long periods, and so become interactive, but during an intensive redraw
>they briefly behave as CPU hogs but maintain their interactive bonus this
>means that ogg123 has to wait until the hogs complete their timeslice
>before being scheduled.
>
>My test case tries to reproduce this by creating a number of tasks which
>alternate between being 'interactive' and CPU hogs. On my Celery 333 laptop
>it can sometimes cause skips with only 1 child, and is pretty much
>guaranteed to cause skips with more child tasks.
Greetings,
Nice test case. I don't have sound capability on my linux box, but your
test case makes it fail the window wiggle test horribly. I fiddled with it
a bit, and convinced it to "stop doing that please". Does the attached
(experimental butchery) help your box's sp-sp-speach im-p-p-pediment?
-Mike
[-- Attachment #2: bk5_sched.diff --]
[-- Type: application/octet-stream, Size: 1033 bytes --]
--- linux-2.5.64-bk5/kernel/sched.c.org Wed Mar 12 08:51:11 2003
+++ linux-2.5.64-bk5/kernel/sched.c Fri Mar 14 15:27:12 2003
@@ -72,7 +72,7 @@
#define PRIO_BONUS_RATIO 25
#define INTERACTIVE_DELTA 2
#define MAX_SLEEP_AVG (10*HZ)
-#define STARVATION_LIMIT (10*HZ)
+#define STARVATION_LIMIT (1*HZ)
#define NODE_THRESHOLD 125
/*
@@ -356,6 +356,8 @@
* spends sleeping, the higher the average gets - and the
* higher the priority boost gets as well.
*/
+ if (sleep_time > MAX_TIMESLICE)
+ sleep_time = MAX_TIMESLICE;
sleep_avg = p->sleep_avg + sleep_time;
/*
@@ -397,6 +399,8 @@
rq->nr_uninterruptible++;
dequeue_task(p, p->array);
p->array = NULL;
+ if (p->sleep_avg)
+ p->sleep_avg--;
}
/*
@@ -1249,6 +1253,8 @@
if (!--p->time_slice) {
dequeue_task(p, rq->active);
set_tsk_need_resched(p);
+ if (TASK_INTERACTIVE(p) && p->sleep_avg > MIN_TIMESLICE)
+ p->sleep_avg -= MIN_TIMESLICE;
p->prio = effective_prio(p);
p->time_slice = task_timeslice(p);
p->first_time_slice = 0;
next prev parent reply other threads:[~2003-03-14 14:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-13 22:01 Charles Baylis
2003-03-14 14:34 ` Mike Galbraith [this message]
2003-03-14 15:46 ` Mike Galbraith
2003-03-14 9:57 Felipe Alfaro Solana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.2.0.9.2.20030314152115.00ce76b0@pop.gmx.net \
--to=efault@gmx.de \
--cc=cb-lkml@fish.zetnet.co.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®