Re: Gurus, a silly question for preemptive behavior

From: Con Kolivas
Date: Tue Dec 21 2004 - 01:01:44 EST

jesse writes:

As i know, in linux, user space application is
preemptive at any time. however, linux kernel is NOT
preemptive, that means, even some event is finished,
Linux kernel scheduler itself still can't have
opportunity to interrupt the current user application
and switch it out. it is called scheduler latency.

The kernel is preemptible if you enable the preempt option in the configuration. There are some code paths that are not preemptible despite this, but they are gradually being improved over time.

normally , the latency is about 88us in mean , maximum
: 200ms. Thus, the short latency shouldn't impact user
applications too much and is not a problem. It is an
issue in those embedded voice processing systems by
introducing jitters, thus smart people came up with
two kernel schedule patch: preemptive patch and low
latency patch.

You're thinking about the 2.4 kernel. 2.6 is effectively both of those patches inclusive.

my system: [root@sa-c2-7 proc]# uname -a Linux sa-c2-7 2.4.21-15.ELsmp #1 SMP Thu Apr 22
00:18:24 EDT 2004 i686 i686 i386 GNU/Linux

If you want lower latency on a 2.4 kernel you need further patches. You are most likely to benefit from a move to a 2.6 kernel and enabling preempt.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at