linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* USB interrupt times
@ 2012-08-14 10:39 Russell King
  2012-08-14 10:54 ` Jiri Kosina
  0 siblings, 1 reply; 7+ messages in thread
From: Russell King @ 2012-08-14 10:39 UTC (permalink / raw)
  To: linux-input, linux-usb; +Cc: Jiri Kosina, Greg Kroah-Hartman

I've been trying to track down where all the CPU time goes while
processing USB interrupts for HID devices.  At the moment, out of
everything on the cubox, moving the mouse or even pressing a key
on the keyboard just once is far more expensive than processing an
interrupt for the network interface or handling the SDHCI port.
Handing HID actions weigh in at around 300-400us per USB interrupt.

Around two-thirds of the time for a USB HID device interrupt is
spent in the HID layer, currently tracked down to:

	for (a = 0; a < report->maxfield; a++)
		hid_input_field(hid, report->field[a], cdata, interrupt);

in hid_report_raw_event().

However, looking at hid_input_report() and its use of down_trylock(),
I'm wondering why we're trying to run this chunk of code in IRQ
context anyway?  Why not a tasklet or workqueue?

Any suggestions on why processing a key press or mouse movement is soo
expensive?

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

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

end of thread, other threads:[~2012-08-15  9:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-14 10:39 USB interrupt times Russell King
2012-08-14 10:54 ` Jiri Kosina
     [not found]   ` <alpine.LNX.2.00.1208141250020.12490-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>
2012-08-14 12:18     ` Russell King
     [not found]       ` <20120814121804.GC7105-f404yB8NqCZvn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2012-08-14 18:30         ` Henrik Rydberg
2012-08-15  9:02       ` Jiri Kosina
2012-08-15  9:15         ` Russell King
2012-08-14 12:31   ` Oliver Neukum

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