public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* delayed interrupt processing caused by cswitching/pipe_writes?
@ 2002-04-06 19:54 Paul Davis
  2002-04-07  1:15 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Davis @ 2002-04-06 19:54 UTC (permalink / raw)
  To: linux-kernel

I am trying to track down some latency-related issues that we are
having with a low latency audio system (JACK, the Jack Audio
Connection Kit, http://jackit.sf.net/).

Its the usual "soft RT" thing (SCHED_FIFO, mlockall), except that it
involves pipe-driven IPC between two RT threads to get the work
done. Read the website if you want to understand why; its not relevant
here. 

Its clear from a week of instrumented kernels, and hours poring over
trace files, that the presence of "activity" on the machine causes
delays in the handling of interrupts from the audio interface by up to
a millisecond. Given that the interrupt frequency is about 1000Hz,
this is not good :)

I know from trials of older kernels and systems in which all the audio
handling resided in the same thread that we can handle a 1.3msec
interrupt interval without real problems. But now that JACK splits the
handling across two threads in different processes, the thing that
kills us is not the context switch times, not the delay caused by
cache and/or TLB invalidation, or any of that stuff. instead, its that
we start delaying the execution of the audio interface interrupt
handler to the point where our assumptions about handling every
interrupt on time fall apart.

the extra work doesn't involve any increased disk activity - the only
extra work involves more writing to memory (which is all mlocked),
writing to pipes for IPC, and extra context switches.

which of these is most likely to cause us to mask interrupts for up to
a millisecond or more? i know its not the handler for the interrupt in
question - it never takes more than 25 usecs to execute.

--p


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-07  1:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-06 19:54 delayed interrupt processing caused by cswitching/pipe_writes? Paul Davis
2002-04-07  1:15 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox