Re: [PATCH] usb:core: Remove unused parameter struct usb_hcd *hcd in usb_hcd_unlink_urb_from_ep

From: Shuah Khan
Date: Thu Oct 31 2024 - 18:04:09 EST


On 10/30/24 07:25, lizhe wrote:

Hi, Shuah Khan


*This sounds like this change isn't required? *

**not, hcd in usb_hcd_unlink_urb_from_ep() is a redundant operation, although the cost of a single instance is minimal, the cumulative cost can be significant,

such as when copying a large file to a USB drive.

I am not convinced this change helps. I would rather keep
the hcd argument to keep the api balanced and be able to
debug a problem that requires the hcd to urb association.

What are the performance numbers you are seeing with and
without your patch when copying a large file to a USB drive?


*Right. Can you quantify the overhead?*

Quantifying it is merely to illustrate the benefits it brings

because removing it has no drawbacks, the benefits of removing HCD are obvious,


There are drawbacks as pointed out in the above paragraph.
The benefits of removing HCD are not obvious to me. Maybe
you can provide them by answering the performance numbers
with and without your patch when copying a large file to a
USB drive keeping all other variables the same.

thanks,
-- Shuah