Re: preemptible kernel


Subject: Re: preemptible kernel
From: Christopher E. Brown (cbrown@woods.net)
Date: Mon Apr 29 2002 - 06:06:50 AKDT


On Sun, 28 Apr 2002, James Bagley Jr. wrote:

> Jon,
>
> probably not.
>
> I can't claim to know a whole lot about pre-emptible kernels, but the
> basic premise is that it will allow a userland process to execute before a
> kernel land process. Basically, if the kernel is busy dealing with
> interrupts it won't steal too much cpu time from your dvd player. Someone
> please correct me if i'm wrong here...
>
> I'm using preemptiveness on my laptop with the 2.5.7 kernel. It is
> noticably snappier when the system becomes really busy. Otherwise, I
> can't tell any difference at all.
>
> I'm also fighting a problem with my sound pausing inexplicably for a
> second or two during play. But, that could be a number of things since
> they are usb speakers (the white noise generated by laptop speakers is
> unbearable). This could be in the usb audio driver, the alsa sound
> drivers, or somewhere else... I'm not sure yet.

I doubt it as well. It all depends on the load that is causing this.
Yes, the prempt kernel can fix this type of problem, but *only* for
certain types of load.

For example, if the system is trapped spinning on IDE IRQs during
batched read/write ops where operational disk latency is increasing
due to nearing the drives IO or seek limit it cannot do anything for
you.

It *CAN* help with things that can be switched fast (unlike waiting
trapped somewhere), like heavy networking loads, memio/etc. Pre-empt
can give a good kick for say Xwindows screen redraws and mouse
movement under heavy load, but disk contention it cannot touch.

Increase your playback buffers in XMMS, make sure you have a current
version of XMMS. The default is to buffer < 3sec audio in XMMS, but
it is fairly easy to spaf an IDE drive for longer than this.

You can also run xmms suid root and enable realtime priority. (Not
that I think running any user tool as root is a good thing) (realtime
priority is the highest userspace prio, it will *always* be run first,
and even a nice -20 process can be starved by one. This is why it is
reserved for root. A runaway realtime can starve out the rest of
userspace.)

-- 
I route, therefore you are.

--------- To unsubscribe, send email to <aklug-request@aklug.org> with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Mon Apr 29 2002 - 06:08:54 AKDT