From: Andrew Morton <akpm@zip.com.au>
To: Paul Davis <pbd@Op.Net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: delayed interrupt processing caused by cswitching/pipe_writes?
Date: Sat, 06 Apr 2002 17:15:55 -0800 [thread overview]
Message-ID: <3CAF9DCB.8C86443@zip.com.au> (raw)
In-Reply-To: <200204061954.g36Jsoe11292@op.net>
Paul Davis wrote:
>
Hi, Paul.
> ...
> 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.
Conceivably, something somewhere is forgetting to reenable interrupts,
and we're just not noticing because the scheduler and/or return
from syscall just turns them on unconditionally.
There are a couple of things you can try.
First is to just use the kernel profiler. Do it on uniprocessor
to make life simpler. If you see a particular function
is showing up prominently then perhaps that's the place
where interrupts are getting turned back on, and that may
point us at the source of the problem.
Note that you'll probably get better retults with a higher
profiling frequency - build the UP kernel with local APIC
support and use `readprofile -M10' to profile at 1000 Hz.
The other approach would be to apply
http://www.zip.com.au/~akpm/linux/timepeg-2.4.19-pre6-1.patch.gz
and enable "Timepeg instrumentation" and "Interrupt latency
instrumentation" in the Kernel Hacking menu.
Compile up http://www.zip.com.au/~akpm/linux/tpt.tar.gz
and run
sudo ./tpt -s | sort -nr +5 | head -20
then run your workload, then run the above command a second time.
I get:
slab.c:1323 -> slab.c:1347 572 .66 55.91 5.90 3375.52
do_IRQ.in:0 -> softirq.c:84 1628 10.72 22.18 11.22 18270.64
exit.c:396 -> exit.c:430 3 5.50 10.66 7.66 22.98
ll_rw_blk.c:886 -> ll_rw_blk.c:996 54 1.25 8.72 2.15 116.28
which shows that the worst-case interrupt-off times
were between lines 1347 and 1323 of slab.c.
Beware that the timepeg patch increases your kernel
size tremendously - it's probably OK with a uniprocessor
build, but even though I've dropped NR_CPUS to 2, a
large SMP kernel build can simply fail to load.
-
prev parent reply other threads:[~2002-04-07 1:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-06 19:54 delayed interrupt processing caused by cswitching/pipe_writes? Paul Davis
2002-04-07 1:15 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CAF9DCB.8C86443@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=pbd@Op.Net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox