Re: [linux-audio-dev] Non preemptive driver layer in linux?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Non preemptive driver layer in linux?
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Fri Jun 23 2000 - 07:32:29 EEST


>With all this chatter about latency issues in Linux, I've had a question
>that has been nagging away at me for some time and I'm sure that you
>fine people on this list can give me a definitive answer. Does linux
>have the same non-preemptive driver "layer" (for lack of a better
>word). Based upon what I've seen transpire on this list over the last 6
>months or so, my "educated" guess would be that it does not. Is there
>any benefit to having a "layer" in the OS that is not preemptive?

The answer is more complex than your question's framing allows for :)

Simple answer:

The problems with latency under Linux arise from 2 sources:

    * interrupts being disabled for too long
    * kernel locks being held when they should not be

If these problems are fixed, you can get performance latency as good
as Reality does by running a program with SCHED_FIFO priority, which
basically says "whenever this task is ready to run, run it no matter
what". It doesn't get rid of "preemption" in the sense of interrupt
handling still interrupting execution flow, but it does get rid of it
in the sense that no other process will get the processor unless the
SCHED_FIFO one blocks (waiting for I/O, for example).

Note that this does NOT involve putting the synth code into the
kernel, as Seer did. There is absolutely no reason to do what Seer did
on a properly designed OS. You can bet that if they ever release
Reality for BeOS, it will not operate in the same way as under
Windows. The same logic applies to Linux, at least if it has the
required patches.

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Jun 23 2000 - 08:41:58 EEST