Re: Bad interactive behaviour in 2.5.65-66 (sched.c)

From: Andrew Morton (akpm@digeo.com)
Date: Sun Mar 30 2003 - 00:23:30 EST


Tom Sightler <ttsig@tuxyturvy.com> wrote:
>
> On my system I get a starvation issue with just about any CPU intensive
> task. For example if create a bzip'd tar file from the linux kernel
> source with the command:
>
> tar cvp linux | bzip2 -9 > linux.tar.bz2
>

Ingo has determined that Linus's backboost trick is causing at least some
of these problems. Please test and report upon the below patch.

I have another workload which is showing starvation with or without this
patch - it is the bitkeeper verification step in a `bk clone' on a
uniprocessor kernel. Still poking at that one.

From: Ingo Molnar <mingo@elte.hu>

the patch below fixes George's setiathome problems (as expected). It
essentially turns off Linus' improvement, but i dont think it can be fixed
sanely.

the problem with setiathome is that it displays something every now and
then - so it gets a backboost from X, and hovers at a relatively high
priority.

 kernel/sched.c | 13 +------------
 1 files changed, 1 insertion(+), 12 deletions(-)

diff -puN kernel/sched.c~sched-interactivity-backboost-revert kernel/sched.c
--- 25/kernel/sched.c~sched-interactivity-backboost-revert 2003-03-28 22:30:08.000000000 -0800
+++ 25-akpm/kernel/sched.c 2003-03-28 22:30:08.000000000 -0800
@@ -379,19 +379,8 @@ static inline int activate_task(task_t *
                  * boosting tasks that are related to maximum-interactive
                  * tasks.
                  */
- if (sleep_avg > MAX_SLEEP_AVG) {
- if (!in_interrupt()) {
- sleep_avg += current->sleep_avg - MAX_SLEEP_AVG;
- if (sleep_avg > MAX_SLEEP_AVG)
- sleep_avg = MAX_SLEEP_AVG;
-
- if (current->sleep_avg != sleep_avg) {
- current->sleep_avg = sleep_avg;
- requeue_waker = 1;
- }
- }
+ if (sleep_avg > MAX_SLEEP_AVG)
                         sleep_avg = MAX_SLEEP_AVG;
- }
                 if (p->sleep_avg != sleep_avg) {
                         p->sleep_avg = sleep_avg;
                         p->prio = effective_prio(p);

_

-
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/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:35 EST