montavista has a nice paper on their recent linux performance work. it seems that a fully preemptible linux kernel is now only a small patch away.
The MontaVista preemptible kernel patch modifies the definition (implementation) of the SMP kernel’s primary IPC, the spinlock, changing it from its SMP specific implementation to a preemption lock. In the preemption scenario, as in its SMP application, the locking function acts as a control on reentrancy to critical sections of kernel code.
Additionally, the preemptible kernel patch modifies the interrupt handling software to allow rescheduling on return from interrupt if a higher priority process has become executable, even if the interrupted process was running in kernel mode (provided the process is not in a critical and locked region). SMP spin unlocks are also redefined to return the system to a preemptible state, and check if an immediate context switch is needed.
Lastly, the kernel build definition for a uniprocessor target system is modified to include the spinlocks construct (implemented as preemption locks). Through these basic changes, the Linux kernel becomes generally preemptible (with short non-preemptible regions corresponding to the spinlocked regions in an SMP kernel). Process level responsiveness is dramatically improved, both on average and worst cases.