2003-09-08 15:41:02

by Francesco Sportolari

[permalink] [raw]
Subject: [PATCH] yet another scheduler patch

Yes.... This is another patch for the scheduler interactivity game... :)

This one is based on the scoring algorithm of the ULE scheduler included in
the latest freeBSD. Every process descriptor includes two new variables:
sleeptime (the time the process spend in voluntary sleep) and runtime
(incremented in scheduler_tick function).

These variable are scaled by the sleeptime_runtime_update() function in such
way that their sum doesn't exceed the SLEEP_RUN_MAX value when the effective
priority is needed.

The interactive score for each process is calculated with the
interactive_score() function (take a look at the patch). If the process int
score is less than the INTERACTIVE_THRESHOLD value, the process itself is
considered interactive and it get a MIN_TIMESLICE time slice.
All the other processes get a time slice proportional to their effective
priorities.

I've tried the patch only on a ppc UP machine and it behaves quite well. I've
made some tests with volanomark under different loads (eg. listening a song
with xmms, playing a movie with xine) and all the results are better than
results of the same tests over a vanilla kernel.

Soon as possible i'll set up a web page with the results.

Also the audio-skip problem in xmms is solved. The window-shaking test has
been passed :).

If someone wants to give a try he's welcome.

Ciao,
-- Francesco


Attachments:
(No filename) (1.35 kB)
francesco_sched_patch.diff (12.88 kB)
Download all attachments

2003-09-09 11:24:28

by Francesco Sportolari

[permalink] [raw]
Subject: Re: [PATCH] yet another scheduler patch

Now my patch works also on x86 platform, and it works well (for me).
Please give it a try, any feedback is welcome!

The attached diff is for 2.6.0-test5 and is only for ppc32 and i386 archs

Ciao,
-- Francesco


Attachments:
(No filename) (211.00 B)
francesco_sched_patch_v2.diff (14.02 kB)
Download all attachments

2003-09-11 05:14:20

by Wade

[permalink] [raw]
Subject: Re: [PATCH] yet another scheduler patch

Francesco Sportolari wrote:

>Now my patch works also on x86 platform, and it works well (for me).
>Please give it a try, any feedback is welcome!
>
>The attached diff is for 2.6.0-test5 and is only for ppc32 and i386 archs
>
>Ciao,
>-- Francesco
>
>
Hi, could you alter this so that it does not mess around with kernel
threads? It should
only adjust user processes. Sorry if it is doing the right thing, but
[eg] pdflush has a prio
of 100 currently..

In general usage (no load, X 4.3.0 + gnome 2.2.x), applications start up
slower.

Under a moderate load (make -j4) xmms will not skip but it fails the
wiggle test.
Renicing X to -10 (it was at 0 before) does not seem to help.

[Machine is an Athlon 1200 (not a rating) with 384mb ram, ide disks with
DMA
enabled]

Hope this helps, somehow :-)

- Wade