mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: lizhe <sensor1010@163.com>,
	gregkh@linuxfoundation.org, linus.walleij@linaro.org,
	stern@rowland.harvard.edu, ok@artecdesign.ee,
	mathias.nyman@intel.com, b-liu@ti.com,
	valentina.manea.m@gmail.com, shuah@kernel.org, i@zenithal.me,
	niko.mauno@vaisala.com, dvyukov@google.com, andreyknvl@gmail.com,
	tj@kernel.org, viro@zeniv.linux.org.uk,
	christophe.jaillet@wanadoo.fr, stanley_chang@realtek.com,
	sylv@sylv.io, lee@kernel.org, colin.i.king@gmail.com
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] usb:core: Remove unused parameter struct usb_hcd *hcd in usb_hcd_unlink_urb_from_ep
Date: Thu, 31 Oct 2024 16:03:52 -0600	[thread overview]
Message-ID: <2ff5424f-7fb0-4e67-a521-e309c870f229@linuxfoundation.org> (raw)
In-Reply-To: <5e2b7e82.b980.192dd9ab0fc.Coremail.sensor1010@163.com>

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

      parent reply	other threads:[~2024-10-31 22:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-27 16:31 李哲
2024-10-28  3:17 ` Shuah Khan
     [not found]   ` <2692e3ef.b806.192d8f95cf3.Coremail.sensor1010@163.com>
2024-10-30  0:33     ` Shuah Khan
     [not found]       ` <5e2b7e82.b980.192dd9ab0fc.Coremail.sensor1010@163.com>
2024-10-31 22:03         ` Shuah Khan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ff5424f-7fb0-4e67-a521-e309c870f229@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=b-liu@ti.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=colin.i.king@gmail.com \
    --cc=dvyukov@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=i@zenithal.me \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=niko.mauno@vaisala.com \
    --cc=ok@artecdesign.ee \
    --cc=sensor1010@163.com \
    --cc=shuah@kernel.org \
    --cc=stanley_chang@realtek.com \
    --cc=stern@rowland.harvard.edu \
    --cc=sylv@sylv.io \
    --cc=tj@kernel.org \
    --cc=valentina.manea.m@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome