On Mon, Aug 19, 2013 at 10:42 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Mon, 19 Aug 2013, Ming Lei wrote: > >> Because usb_hcd_submit_urb is in the hotest path of usb core, >> so use percpu counter to count URB instead of using atomic variable >> because atomic operations are much slower than percpu operations. > > This seems like a ridiculous amount of additional overhead for a simple > counter. The kernel doesn't even use this value for anything; it's > only purpose is to allow userspace to see how many URBs have been > transferred for a device. (I don't know what programs use this > information. Powertop maybe?) That is why I want to remove the expensive atomic inc/dec, or can we remove the counter? > > Do you have any reason to believe this will really improve performance > at all? Please see my reply on Greg's comments. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html