[linux-audio-dev] another kernel patch?

Roger Larsson roger.larsson at norran.net
Mon Dec 1 08:37:28 UTC 2003


On Sunday 30 November 2003 05.03, Jack O'Quin wrote:
> Roger Larsson <roger.larsson at norran.net> writes:
> > > That's right.  But, Paul and I have been working closely with this and
> > > don't have much faith in the correctness of the 2.4 scheduler.
> >
> > Have you told kernel developers about this?
> > This can be rather critical in embedded systems.
>
> No.  It's rather difficult to prove.  There's no "smoking gun".
>
> But, I have no reason to believe that it works correctly, and I
> suspect that it probably does not.

Is there a tread documenting your problems?
Anything else?

>
> > > What problem does this solve?
> >
> > It will better match what you think you do.
> >
> > When jackd writes in the FIFO - expect client to start.
> > Jackd waits for baton - wait for client to finish.
> >
> > But with jackd as highest priority:
> > Jackd writes to FIFO - nothing will happen for client.
> > Jackd _waits_ for baton - now client start, processes, finishes.
>
> I don't see why this is a problem.  All this has to happen for every
> cycle, anyway.  What difference does it make?  And, why do you think we
> don't understand this?

Sorry, I got my wording wrong! ("you" = developers in general)


But it is still a way to see that no client burns cycles where it should not -
jackd would not start (or stop). And you _can_ get fewer context switches,
but only if some client burns extra cycles.

Compare:

With jackd as highest priority:
* Client A running
* Jackd starts (higher prio than A), telling client B to run
* Jackd waits
* Client A contiues to run (higher prio than B)
  - this could be something very short like preparing to go
    to sleep after passing the baton.
* Client A done, goes to sleep.
* Client B runs - but later than expected...
* Client B done
* Jackd continues

Context switches: A->jd->A->B->jd

With jackd as lowest priority:
* Client A runs
* Jackd wants to start but has to wait
* Client A continues to run
* Client A done, goes to sleep
* Jackd starts, telling client B to run
* Client B starts
* Client B done
* Jackd continues, waits - B is finished

Context switches: A->jd->B->jd

Trying with jackd with lowest priority would atleast give you another
data point.

/RogerL

-- 
Roger Larsson
Skellefteå
Sweden




More information about the Linux-audio-dev mailing list