Re: latest 'guaranteed low latency' patch against 2.2.14

From: Ingo Molnar (mingo@chiara.csoma.elte.hu)
Date: Wed Feb 09 2000 - 13:09:42 EST


On Wed, 9 Feb 2000, John Regehr wrote:

> > how do you improve task-execution latency without rescheduling actually?

> Well, in NT, IRIX, BeOS, and (I think) Solaris tasks running in kernel
> mode can be preempted any time as long as they're not holding a spinlock.

yep, sure - this is possible in Linux as well, mainly due to the work
underway in 2.2/2.3 to get finegrained SMP. (finegrained SMP is analogous
to 'freely preemptable kernel') This does not mean any conceptual
difference wrt. managing latencies though, and certainly not any
conceptual latency improvements as the kernel_lock has to be honored on
SMP. (the kernel lock alone can be held for several millisecs). So the
'managing preemption point latencies' issue becomes a 'managing spinlock
latencies' issue.

> Certainly making a kernel preemptible increases complexity. I'd be

it increases the complexity of spinlocks for example, one crucial piece of
code. it also raises interesting questions about 'do we want to schedule
away a task holding a crucial semaphore'. So in fact an asynchronously
preemptable kernel can _increase_ latencies.

> > any device interrupt can be turned into an NMI interrupt - of course
> > special handlers have to be written, and careful coding is needed as no
> > other kernel facilities can be relied on.
>
> Won't this hose RT-Linux? If random device drivers start using NMI (as
> Alan Cox suggested in a different mail) then it would be really nice if
> there was a way to disable this behavior at compile time.

currently only the 'NMI watchdog' is using this, which has constant
overhead and no locking. It can be disabled both runtime and compile-time.

-- mingo

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



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:15 EST