Re: [linux-audio-dev] Simple question on JACK and callbacks

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

Subject: Re: [linux-audio-dev] Simple question on JACK and callbacks
From: Karl MacMillan (karlmac_AT_danse.peabody.jhu.edu)
Date: Wed Nov 14 2001 - 18:55:48 EET


On Wednesday 14 November 2001 10:49, Andy Wingo wrote:

> > OTOH, if the process() function is not run inside the server, but as a
> > thread of the "main" app, how does this save any context switches?
>
> One other thing I forgot to mention is that the shm memory is only valid
> after you receive the 'data ready' signal (i.e., after you can read from
> the second fd). Then, once you're done with it, you write on the same fd
> to tell the server you're done.
>
> This is all very implementation-side, so most app writers should not have
> to worry about this. but to summarize, process() gets called between
> libjack wakes you up from the poll() and before libjack writes on that
> fd.
>
> now, how this reduces context switches, I don't really know ;) could be
> something about how poll is implemented, i'll admit my ignorance on this
> one.
>

By having each client directly call the next client (by writing to the pipe)
instead of having the server (jackd) call each client in turn there are less
context switches - i.e. the server process is woken up less times.

Karl

> cheers,
>
> wingo.


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

This archive was generated by hypermail 2b28 : Wed Nov 14 2001 - 18:57:42 EET