From: Sarah Sharp Date: Fri, 30 Jul 2010 05:12:20 +0000 (-0700) Subject: USB: xhci: Performance - move functions that find ep ring. X-Git-Tag: v2.6.36-rc1~293^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=021bff9179c2d19c26599dc3e9134d04cf1c8a3a;p=pandora-kernel.git USB: xhci: Performance - move functions that find ep ring. I've been using perf to measure the top symbols while transferring 1GB of data on a USB 3.0 drive with dd. This is using the raw disk with /dev/sdb, with a block size of 1K. During performance testing, the top symbol was xhci_triad_to_transfer_ring(), a function that should return immediately if streams are not enabled for an endpoint. It turned out that the functions to find the endpoint ring was defined in xhci-mem.c and used in xhci-ring.c and xhci-hcd.c. I moved a copy of xhci_triad_to_transfer_ring() and xhci_urb_to_transfer_ring() into xhci-ring.c and declared them static. I also made a static version of xhci_urb_to_transfer_ring() in xhci.c. This improved throughput on a 1GB read of the raw disk with dd from 186MB/s to 195MB/s, and perf reported sampling the xhci_triad_to_transfer_ring() 0.06% of the time, rather than 9.26% of the time. Signed-off-by: Sarah Sharp Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed