From: Joey Oravec <joravec@drewtech.com>
To: linux-rt-users@vger.kernel.org
Subject: fixing irq latency from spin_lock_irqsave
Date: Thu, 13 Oct 2011 15:52:12 -0400 [thread overview]
Message-ID: <4E97416C.50309@drewtech.com> (raw)
Hello developers,
Hopefully this is the right list. I'm trying to improve interrupt
latency on my 1ghz Marvell ARM platform. I used the irqsoff tracer to
check drivers one-by-one and characterize my system. My max latency is
80-500 uS at idle and certain drivers are hotspots: ath9k (3000 uS),
sata disk (2000 uS), and 8250 serial (9000+ uS).
In each case it looks like the latency was caused by spin_lock_irqsave()
around something that waited for I/O. For example function
ath9k_ps_wakeup holds a spin lock for a 10ms timeout while the card
powers up. Or function serial8250_console_write holds a spin lock
waiting for bytes to transmit at 115.2 kBaud.
My plan was to change any of these hotspots to a threaded IRQ handler,
change spin locks to mutex, and retest. That worked in some simple cases
but ath9k has 10+ spinlocks, tasklets, etc. Can anybody recommend a
general approach for improving spin_lock_irqsave() without completely
reworking each driver's locking strategy? Are there any documents that I
should start with?
-joey
reply other threads:[~2011-10-13 19:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4E97416C.50309@drewtech.com \
--to=joravec@drewtech.com \
--cc=linux-rt-users@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).