lkml.org 
[lkml]   [2003]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] "HT scheduler", sched-2.5.63-B3
Linus Torvalds <torvalds@transmeta.com> wrote:
>
>
> ===== kernel/sched.c 1.161 vs edited =====
> --- 1.161/kernel/sched.c Thu Feb 20 20:33:52 2003
> +++ edited/kernel/sched.c Wed Mar 5 19:09:45 2003
> @@ -337,8 +337,15 @@
> * boost gets as well.
> */
> p->sleep_avg += sleep_time;
> - if (p->sleep_avg > MAX_SLEEP_AVG)
> + if (p->sleep_avg > MAX_SLEEP_AVG) {
> + int ticks = p->sleep_avg - MAX_SLEEP_AVG + current->sleep_avg;
> p->sleep_avg = MAX_SLEEP_AVG;
> + if (ticks > MAX_SLEEP_AVG)
> + ticks = MAX_SLEEP_AVG;
> + if (!in_interrupt())
> + current->sleep_avg = ticks;
> + }
> +
> p->prio = effective_prio(p);
> }
> enqueue_task(p, array);

This improves the X interactivity tremendously. I went back to 2.5.64 base
just to verify, and the difference was very noticeable.

The test involved doing the big kernel compile while moving large xterm,
mozilla and sylpheed windows about. With this patch the mouse cursor was
sometimes a little jerky (0.1 seconds, perhaps) and mozilla redraws were
maybe 0.5 seconds laggy.

So. A big thumbs up on that one. It appears to be approximately as
successful as sched-2.5.64-a5.

Ingo's combo patch is better still - that is sched-2.5.64-a5 and your patch
combined (yes?). The slight mouse jerkiness is gone and even when doing
really silly things I cannot make it misbehave at all. I'd handwavingly
describe both your patch and sched-2.5.64-a5 as 80% solutions, and the combo
95%.


So I'm a happy camper, and will be using Ingo's combo patch. But I do not
use XMMS and xine and things like that - they may be running like crap with
these patches. I do not know, and I do not have a base to compare against
even if I could work out how to get them going.


I did spend a bit of time a while back trying to come up with some
combination of tests which would exhibit this problem, and which would allow
it to be measured and tweaked. It was unsuccessful - the peculiar
combination of a compilation and X seems to bring it out.


-
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: 2005-03-22 13:33    [W:0.127 / U:1.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site