Re: [linux-audio-dev] Re: [announce] [patch] Voluntary Kernel Preemption Patch

From: Scott Wood
Date: Thu Jul 22 2004 - 13:55:35 EST


On Thu, Jul 22, 2004 at 09:40:34AM +0200, Ingo Molnar wrote:
> * Scott Wood <scott@xxxxxxxxxxx> wrote:
> > This sort of substitution is what we did in 2.4, though we made this
> > type the default and gave the real spinlocks a new name to be used in
> > those few places where it was really needed. Of course, this resulted
> > in a lot of places using a mutex where a spinlock would have been
> > fine.
>
> what are those few places where a spinlock was really needed?

Places that inherently cannot sleep, such as inside the scheduler,
the unthreadable part of the hard IRQ code, inside the mutex
implementation, etc.

> I'm a bit uneasy about making mutexes the default not due to performance
> but due to e.g. some hardware being very timing-sensitive.

In practice, this didn't turn out to be an issue; most modern
hardware seems to be pretty tolerant of that (and you already have to
deal with things like interrupts getting in the way), and drivers
which do local_irq_disable() or to ensure timing will still work.

Has this sort of problem been seen with RT-Linux and such, which
would cause similar delays?

-Scott
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/