[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Kernel preemption
On Sun, Apr 27, 2008 at 03:16:23AM +0000, David Holland wrote:
> On Fri, Apr 25, 2008 at 08:13:34PM +0100, Andrew Doran wrote:
> > The below patch implments in-kernel preemption for the i386 port.
> Is in-kernel preemption really worthwhile on multiprocessor machines?
Yes, I think so. There are long/slow code paths within the kernel.
> Given fine-grained locking it's not clear that it really helps much
> with scheduler latency, and it adds potentially quite a bit of
> overhead because you have to fiddle with interrupts for all spinlocks
> rather than just those that are touched by interrupt code. Plus it
> makes per-cpu stuff that much harder to work with.
We make extensive use of adaptive locks which can be preempted safely and
don't require playing about with the interrupt level, so it's not really a
problem for us. Only items that can be accessed from a hardware interrupt
handler are covered by pure spinlock, for example the scheduler, and that's
not preemptible anyway.
Main Index |
Thread Index |