Nick Piggin wrote:
Timeslices get scaled by /proc/sys/kernel/base_timeslice. If you have bad
interactivity you could try lowering this and see if it helps.
As I am on 2.6.20, I can't really test this patch, but I tried your sched from PlugSched and its not bad.
I'm getting strange numbers with chew.c, though. Try this:
Boot into /bin/sh
Run ./chew on one console.
Run ./chew on another console.
Watch latencies.
Console 1:
pid 671, prio 0, out for 799 ms, ran for 800 ms, load 50%
pid 671, prio 0, out for 799 ms, ran for 801 ms, load 50%
pid 671, prio 0, out for 799 ms, ran for 799 ms, load 49%
pid 671, prio 0, out for 800 ms, ran for 800 ms, load 49%
Console 2:
pid 672, prio 0, out for 800 ms, ran for 799 ms, load 49%
pid 672, prio 0, out for 799 ms, ran for 800 ms, load 50%
pid 672, prio 0, out for 799 ms, ran for 800 ms, load 50%
pid 672, prio 0, out for 799 ms, ran for 799 ms, load 49%
pid 672, prio 0, out for 799 ms, ran for 799 ms, load 49%
Looks good, but now add a cpu-hog, ie. while :; do :; done
Console 1:
pid 671, prio 0, out for 799 ms, ran for 399 ms, load 33%
pid 671, prio 0, out for 799 ms, ran for 399 ms, load 33%
pid 671, prio 0, out for 799 ms, ran for 399 ms, load 33%
pid 671, prio 0, out for 799 ms, ran for 399 ms, load 33%
Console 2:
pid 672, prio 0, out for 1599 ms, ran for 799 ms, load 33%
pid 672, prio 0, out for 1599 ms, ran for 799 ms, load 33%
pid 672, prio 0, out for 1599 ms, ran for 800 ms, load 33%
pid 672, prio 0, out for 1599 ms, ran for 799 ms, load 33%
It's smooth, but latencies are double on console2. Easy enough to fix, though, just press scrollock to induce a sleep and then release.
Also, latencies are huge. Is there a way to fix latencies per nice?