From: Russell King <rmk@arm.linux.org.uk>
To: linux-input@vger.kernel.org, linux-usb@vger.kernel.org
Cc: Jiri Kosina <jkosina@suse.cz>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: USB interrupt times
Date: Tue, 14 Aug 2012 11:39:36 +0100 [thread overview]
Message-ID: <20120814103936.GA7105@flint.arm.linux.org.uk> (raw)
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:
next reply other threads:[~2012-08-14 10:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 10:39 Russell King [this message]
2012-08-14 10:54 ` USB interrupt times 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
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=20120814103936.GA7105@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-usb@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).