linux/drivers/usb/class
Greg Kroah-Hartman 71c2fb03fc USB: cdc-acm: remove unneeded spin_lock_irqsave/restore on write path
When writing data we were:
	lock
	do some work
	unlock
	call function
		lock
		do some work
		unlock
		return
	return

It turns out, that "function" was only ever called in the one place, so
instead of locking/unlocking for no good reason, just inline the
function and only grab the lock once.

This has sped up the pathological case of sending 1 byte packets to a
loop-back cdc-acm device from 49600 bytes per second to 50100 bytes a
second on my workstation.  A tiny increase yes, but noticable, and now
the spinlock isn't the hottest thing on the perf graph anymore.  Yes, we
are still waiting for the hardware for the most part, but getting rid of
a spinlock_irq_save() call for every packet is still a good thing.

And we end up deleting lines of code, always a win overall.

This was found by using a Teensy 3.0 device and the test program and
firmware located at:
	http://www.pjrc.com/teensy/benchmark_usb_serial_receive.html

Reported-by: Paul Stoffregen <paul@pjrc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 13:37:07 -07:00
..
cdc-acm.c USB: cdc-acm: remove unneeded spin_lock_irqsave/restore on write path 2013-06-17 13:37:07 -07:00
cdc-acm.h USB: cdc-acm - blacklist IMS PCU device 2013-03-12 08:50:23 -07:00
cdc-wdm.c USB: cdc-wdm: implement IOCTL_WDM_MAX_COMMAND 2013-03-25 13:32:20 -07:00
Kconfig USB: regroup all depends on USB within an if USB block 2013-04-09 16:49:07 -07:00
Makefile
usblp.c USB: usblp.c: remove dbg() usage 2012-05-01 21:33:31 -07:00
usbtmc.c USB: usbtmc: Change magic number to constant 2013-05-16 17:50:51 -07:00