2007-05-04 13:01:07

by Con Kolivas

[permalink] [raw]
Subject: 2.6.21-ck1

This patchset is designed to improve system responsiveness and interactivity.
It is configurable to any workload but the default -ck patch is aimed at the
desktop and -cks is available with more emphasis on serverspace.

Apply to 2.6.21
http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/2.6.21/2.6.21-ck1/patch-2.6.21-ck1.bz2

or server version
http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/2.6.21/2.6.21-ck1/patch-2.6.21-cks1.bz2

web:
http://kernel.kolivas.org

wiki:
http://ck.wikia.com

all patches:
http://www.kernel.org/pub/linux/kernel/people/ck/patches/


Changes since 2.6.20-ck1:

The staircase-deadline cpu scheduler has replaced the old staircase design in
this version. The extra scheduling policies in 2.6.20-ck1 of SCHED_IDLEPRIO
(idle cpu scheduling) and SCHED_ISO (unprivileged soft real time) have been
rewritten and work in the same manner on this new scheduler. In almost all
ways this should be a drop in replacement for the older -ck and no userspace
changes should be required apart from deprecating the "compute" tunable (see
below).

More HZ options were added to this kernel. I have had repeated requests for
this as people have found woefully coded binary only availability software
that is dependant on the HZ value for performance (specifically the game
servers). Since it's trivial to add extra values I offer (mostly unsupported)
values up to 10000 HZ. People have found game servers benefitting from up to
4000 if I recall correctly. Note this patch will, unfortunately, cause a
reject with 2.6.21.1 so if you wish to apply -ck to that kernel, please apply
2.6.21.1 first and then -ck and ignore the reject, or back out the
hz-raise_max-2.patch


The "interactive" tunable in
/proc/sys/kernel/interactive
still exists but its effects are now subtle, and fairness is still quite
strongly maintained with it enabled, and starvation is still impossible.
The -cks patch has this disabled by default. From the sysctl documentation
included in Documentation/sysctl/kernel here is a summary:

The staircase-deadline cpu scheduler can be set in either purely
forward-looking mode for absolutely rigid fairness and cpu distribution
according to nice level, or it can allow a small per-process history
to smooth out cpu usage perturbations common in interactive tasks by
enabling this sysctl. While small fairness issues can arise with this
enabled, overall fairness is usually still strongly maintained and
starvation is never possible. Enabling this can significantly smooth
out 3d graphics and games.


The "compute" tunable has been deprecated. The new tunable which is more
flexible is the use of "rr_interval"
/proc/sys/kernel/rr_interval
and this describes the millisecond duration tasks at the same priority round
robin between each other. The default value chosen is 6ms on UP on -ck and
10ms on UP on -cks. With more cpus it is scaled upwards. It can be changed on
the fly up to 5000. Setting it to this has a similar and even more profound
effect on throughput for pure cpu bound tasks but causes large increases in
scheduling latency. This would be highly desirable for a render or compile
farm machine though.


Split patches available:
http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/2.6.21/2.6.21-ck1/patches/


Full patchlist:

ck1-version.patch
2.6.21-sd-0.48.patch
sched-sd-0.48-interactive_tunable.patch
sched-range.patch
sched-iso-5.4.patch
track_mutexes-1.patch
sched-idleprio-2.3.patch
sched-limit_policy_changes.patch
sched-add-above-background-load-function.patch
cfq-ioprio_inherit_rt_class.patch
cfq-iso_idleprio_ionice.patch
mm-swap_prefetch-35.patch
mm-convert_swappiness_to_mapped.patch
mm-lots_watermark.diff
mm-kswapd_inherit_prio-1.patch
mm-prio_dependant_scan-2.patch
mm-background_scan-2.patch
mm-filesize_dependant_lru_cache_add.patch
mm-idleprio_prio.patch
kconfig-expose_vmsplit_option.patch
hz-default_1000.patch
hz-no_default_250.patch
hz-raise_max-2.patch
ck-desktop-tune.patch
+/- 2.6.21-ck1-cks1.patch

乾杯

--
-ck


Attachments:
(No filename) (3.96 kB)
(No filename) (189.00 B)
Download all attachments

2007-05-04 19:11:00

by David J. Wallace

[permalink] [raw]
Subject: Re: [ck] 2.6.21-ck1

On Friday 04 May 2007 14:00, Con Kolivas wrote:
> This patchset is designed to improve system responsiveness and
> interactivity. It is configurable to any workload but the default -ck patch
> is aimed at the desktop and -cks is available with more emphasis on
> serverspace.

Hi Con,

I have 2.6.21-ck1 running happily on a variety of machines. Everything seems
fine on both uniprocessor and SMP machines.

I've been running SD for a couple of weeks now, including alternating between
a SD patched kernel and an "old" staircase based kernel for a week of that.
SD seems perfectly smooth. In fact on going back to the old kernel for a day
I'm sure it felt more "choppy". I don't really do benchmarks, "feel" is more
relevant to me. Right now I'd say my R4 "feels" better with SD than it has
for a long time. Nice Job. Thanks for persisiting.

As an aside I realized whilst trying non ck kernels the last few weeks just
how much of a difference swap prefetch actually makes on a lowish memory
machine such as this.

Arigatou gozaimashita

David


Attachments:
(No filename) (1.03 kB)
(No filename) (189.00 B)
Download all attachments

2007-05-05 15:36:08

by Miguel Figueiredo

[permalink] [raw]
Subject: Re: 2.6.21-ck1

Con Kolivas wrote:
> This patchset is designed to improve system responsiveness and interactivity.
> It is configurable to any workload but the default -ck patch is aimed at the
> desktop and -cks is available with more emphasis on serverspace.
>
> Apply to 2.6.21
> http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/2.6.21/2.6.21-ck1/patch-2.6.21-ck1.bz2
>

Hi all,

i am using this patch for the first time and i am reporting my experience.

Before this patch with all the programs i usually keep running
(opera/iceweasel with lots of tabs, icedove mail client, konversation
irc client, akregator feed reader, and the super-hog second life client,
vim, among others) the reponse was a bit slugish (waiting for program
focus, wait for redrawing specially when i change from one virtual
desktop to another).

After I started using this patch the response/interactivity seems
improved and faster, i never used Linux so responsive as now. I can
switch between virtual desktops with immediate response. Even with a
load of 2.0 (now, while i am writing this) thse system it's very
responsive and the audio and video still work without glitches.

Just for the record, and if it matters i am using it on a laptop with a
T2500 CPU, 1 GB RAM.

If there's any way i can help, providing data, running any kind of
benchmark to quantify the beahaviour, etc... please ask.



Thanks all who made/tested this patch. Good work. Thanks.



[...]

>
> 乾杯
>


--

Com os melhores cumprimentos/Best regards,

Miguel Figueiredo
http://www.DebianPT.org

2007-05-06 01:46:47

by Ryan M.

[permalink] [raw]
Subject: Re: 2.6.21-ck1

Hello Con,

Con Kolivas wrote:
> This patchset is designed to improve system responsiveness and interactivity.
> It is configurable to any workload but the default -ck patch is aimed at the
> desktop and -cks is available with more emphasis on serverspace.

I have used SD for the first time with this patchset, and I have to say, my experience
has been very positive over the past four days. My desktop has been extraordinarily
smooth during interactive tasks with no audio drop-outs. Best of all, the desktop has
been completely responsive despite CPU hogging tasks. I do not need to nice X either.
This looks like a perfect scheduler.

Swap prefetch continues to work its miracles as I've been doing a lot of work lately with
a 33"x44" poster that contains many high-resolutions images, while using gimp at the same time!

Thanks so much for all your incredible work!

>
> 乾杯
>
>

best,
Ryan