Kernel 2.4.17 Out
ThatComputerGuy writes "Linux kernel 2.4.17 is final, with a lot of fixes/updates. Check out the huge changelog. If you're on a desktop machine, you should try using RML's preempt patch, it definitely helps response times."
← Back to Stories (view on slashdot.org)
I used the preempt patch back when 2.4.14 was released and I kept getting consistent kernel panics. Mind you, I'd also applied an -ac patch, so I can't say for certain that preemption was the cause, but it was troubling and the panics went away once I disabled preemption.
STOP MISUSING APOSTROPHES, YOU MORONS!!!
You will want to wait until RML releases the finale preempt patch. It will just be the kernel version (2.4.17) without the rc on the end. His patches are very version specific.
Pbur
A bios upgrade fixed the problem for me. Look for an update on your motherboard vendor's website.
I have mirrored the patch and signature:
. bz2
. bz2.sign
patch-2.4.17.bz2 (388KB): http://home.earthlink.net/~noodlez84/patch-2.4.17
patch-2.4.17.bz2.sign (1KB): http://home.earthlink.net/~noodlez84/patch-2.4.17
The patch makes a big difference for me when using latency-sensitive software (xmms) while I'm really pummeling my system (big compile).
xmms usually skips a bit while I'm compiling something large, but it hasn't even once after applying the preempt patch.
I haven't noticed performance degredation from any effects on throughput, so it's all good here.
"Where shall the word be found, where will the word resound? Not here, there is not enough silence." -T.S. Eliot
Having a preemptive kernel just means that the kernel will allow itself to be interrupted by other programs and give them some cpu time.
This improves response time for your programs as now they won't get stuck waiting for the kernel to finish doing something time-consuming (like disk I/O) before they get some cpu cycles.
In most cases this isn't a big deal, but you'd definitely notice when your mp3 player skips because it's stuck in line behind the kernel.
"Where shall the word be found, where will the word resound? Not here, there is not enough silence." -T.S. Eliot
There are two things here. Preemptive in userspace, and preemptive in kernel space. Linux is preemptive in user space, meaning that when a process is running application code, it can be preempted. When it is running kernel code, however (ie. during a system call) the scheduler will not preempt the thread, even if a higher priority one becomes available. Essentially (on a single processor) the kernel code is cooperatively multitasked. Kernel code runs until schedule() is called to invoke the scheduler. Some kernel code paths are very long, which leads to long periods where the current process cannot be preempted, which kills latency.
Also, to expand on the original question, there are a couple objections to the patch: It has the potential total throughput, because more locking must be used since the kernel can be preempted at any time, not just at specified points. However, in practice, the effect on throughput seems to be negligible. It also increases complexity, due to additional locking, but most of the complexity is there anyway, in the form of the SMP locks.
A deep unwavering belief is a sure sign you're missing something...
> I don't understand the difference between preemtive and the normal way (btw: which?).
The normal (old) way is "cooperative" -- meaning you don't yield a task until you're ready.
Pre-emptive means you can be forced to give up your task.
Ah! Partially right! But sorry, no dice. The only cooperative multitasking that is done in Windows 9x is with 16 bit applications, since all 16-bit apps are run in the same virtual machine. All 32-bit apps are fully preemptively (userspace multitasked. As for memory protection, that's only partially true. Application memory is indeed protected from each other. However, there is a big 1GB region of shared memory that is unprotected. Apps that use this region and asking to hose the system. Also, some bits of kernel memory are unprotected because DOS apps need access to them.
As for NT, it is a fully preemptible kernel, both in userspace and kernel space. Like all preemptive kernels, of course, it is not preemptible when interrupts are disabled (since the clock interrupt can't happen). The main reason why NT has always been preemptive is because its always been SMP. The locking requirements on SMP are similar to to locking requirements for a preemptible kernel, so you can get both together for the price of one. Indeed, the preemptive patch for Linux is very small because it uses the existing SMP locking mechanism.
A deep unwavering belief is a sure sign you're missing something...