linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fixing irq latency from spin_lock_irqsave
@ 2011-10-13 19:52 Joey Oravec
  0 siblings, 0 replies; only message in thread
From: Joey Oravec @ 2011-10-13 19:52 UTC (permalink / raw)
  To: linux-rt-users

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-13 19:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13 19:52 fixing irq latency from spin_lock_irqsave Joey Oravec

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).