]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
USB: EHCI: fix performance regression
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 20 May 2008 20:59:33 +0000 (16:59 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 29 May 2008 20:59:04 +0000 (13:59 -0700)
commitfa38dfcc56b5f6cce787f9aaa5d1830509213802
treeaf6c68e248233434cce1b8a4bcf361039aa5ef8f
parentb40e43fcc532fa44a375a37d592e32cd0d50fe7a
USB: EHCI: fix performance regression

This patch (as1099) fixes a performance regression in ehci-hcd.  The
fundamental problem is that queue headers get removed from the
schedule too quickly, since the code checks for a counter advancing
rather than making an actual time-based check.  The latency involved
in removing the queue header and then relinking it can severely
degrade certain kinds of workloads.

The patch replaces a simple counter with a timestamp derived from the
controller's uframe value.  In addition, the delay for unlinking an
idle queue header is increased from 5 ms to 10 ms; since some
controllers (nVidia) have a latency of up to 1 ms for unlinking, this
reduces the relative impact from 20% to 10%.

Finally, a logical error left over from the IAA watchdog-timer
conversion is corrected.  Now the driver will always either unlink an
idle queue header or set up a timer to unlink it later.  The old code
would sometimes fail to do either.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Cc: Leonid <leonidv11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-q.c