Messages in this thread |  | | Date | Thu, 04 Jan 2001 08:35:02 +0100 | From | Daniel Phillips <> | Subject | Re: [PATCH] 2.4.0-prerelease: preemptive kernel. |
| |
ludovic fernandez wrote: > The following patch makes the kernel preemptable. > It is against 2.4.0-prerelease on for i386 only. > It should work for UP and SMP even though I > didn't validate it on SMP. > Comments are welcome.
I was expecting to see this sometime in 2.5, not quite so soon...
The key idea here is to disable preemption on spin lock and reenable on spin unlock. That's a practical idea, highly compatible with the current way of doing things. Its a fairly heavy hit on spinlock performance, but maybe the overall performance hit is small. Benchmarks are needed.
A more ambitious way to proceed is to change spinlocks so they can sleep (not in interrupts of course). There would not be any extra overhead for this on spin_lock (because the sleep test is handled off the fast path) but spin_unlock gets a little slower - it has to test and jump on a flag if there are sleepers.
-- Daniel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |