public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: David Wang <00107082@163.com>, Mathias Nyman <mathias.nyman@intel.com>
Cc: gregkh@linuxfoundation.org, oneukum@suse.com,
	stern@rowland.harvard.edu, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] USB: core: add a memory pool to urb caching host-controller private data
Date: Wed, 21 May 2025 16:34:53 +0300	[thread overview]
Message-ID: <f22dd1b0-fe1a-49a4-931d-15d57589b03b@linux.intel.com> (raw)
In-Reply-To: <49228bf7.a1d1.196f303aa15.Coremail.00107082@163.com>

On 21.5.2025 16.23, David Wang wrote:

>> Won't this still allocate a lot of unnecessary memory for the roothub urbs?
>> i.e. the ones queued with rh_urb_enqueue(hcd, urb).
>> The host drivers don't use the urb->hcpriv of those URBs.
>>
> The mempool slot is alloced on demand when hcd request private data with its urb.
> If a urb is  ever used by hcd and the  hcd requests private data with it, a  memory would be alloced
> and this memory will not be released until the urb is destroyed.

Ok, thanks for the clarification.
Roothubs URBs should be fine then.

Thanks
Mathias

  reply	other threads:[~2025-05-21 13:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-17  8:38 [PATCH v3 1/2] USB: core: add a memory pool to urb caching host-controller private data David Wang
2025-05-21 10:32 ` Greg KH
2025-05-21 11:25   ` David Wang
2025-05-21 12:58     ` Greg KH
2025-05-21 13:36       ` David Wang
2025-05-21 12:59     ` Greg KH
2025-05-21 14:00       ` David Wang
2025-05-21 15:34         ` David Wang
2025-05-21 12:28 ` Mathias Nyman
2025-05-21 13:23   ` David Wang
2025-05-21 13:34     ` Mathias Nyman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-17  8:35 David Wang

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=f22dd1b0-fe1a-49a4-931d-15d57589b03b@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=00107082@163.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=oneukum@suse.com \
    --cc=stern@rowland.harvard.edu \
    /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