Re: [patch] voluntary-preempt-2.6.8-rc3-O5

Lee Revell
2004-08-12T00:52:49Z

On Wed, 2004-08-11 at 08:43, Ingo Molnar wrote:
> * Florian Schmidt <mista.tapas@gmx.net> wrote:
>
> > > i'm currently running a loop of mlockall-test 100MB on a 466 MHz
> > > Celeron, and not a single blip on the radar with a 1000 usecs
> > > threshold, after 1 hour of runtime ...
> >
> > I suppose you're not using jackd. As i have noticed that these
> > critical sections only get reported when jackd is running. It seems
> > jackd is producing a certain kind of load which exposes them..
>
> so you can only trigger the latencies via mlockall-test if jackd is also
> running? Or do the latencies only trigger in jackd (and related
> programs)?
>
> if the later, then i'm wondering whether any of the audio code turns off
> caching for specific pages or does DMA to user pages, or mmap()s device
> (PCI) memory?
>

I believe that jackd may do all of these. I am adding Paul Davis to the
cc: list as he would know better.

Whatever is going on, it only happens at jackd startup. Jackd does not
report an xrun because the developers added code not to report an xrun
within the first 64 frames, so this message would not confuse users.

There is definitely some subtle bug in the preempt-timing patch, because
I am getting reports of long non-preemptible sections, which do not
correspond to an xrun in jackd - if these were real then even a 400usec
non-preemptible section would cause an xrun. I do not seem to get many
xruns during normal jackd operation.

If, during initialization, jackd called some function that could sleep
*after* starting the PCM, for example if it tried to allocate memory in
the same thread as the audio, this would cause an xrun, because the
soundcard interrupt would occur, but jackd would not be woken up because
it is sleeping on some other resource, correct? Then, when jackd
eventually woke up, it would see that a lot of time had passed, and
report an xrun. This would look the same as if jackd had been ready to
run and had not been scheduled in time.

Lee