From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Greg KH <gregkh@linuxfoundation.org>, Guan-Yu Lin <guanyulin@google.com>
Cc: mathias.nyman@intel.com, perex@perex.cz,
dominique.martinet@atmark-techno.com, eadavis@qq.com,
hannelotta@gmail.com, tiwai@suse.com, quic_wcheng@quicinc.com,
broonie@kernel.org, arnd@arndb.de, xiaopei01@kylinos.cn,
wesley.cheng@oss.qualcomm.com, sakari.ailus@linux.intel.com,
stern@rowland.harvard.edu, amardeep.rai@intel.com,
xu.yang_2@nxp.com, andriy.shevchenko@linux.intel.com,
nkapron@google.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org
Subject: Re: [PATCH v4 0/2] usb: offload: Decouple interrupter lifecycle and refactor usage tracking
Date: Wed, 1 Apr 2026 17:47:51 +0300 [thread overview]
Message-ID: <885a239a-9ead-41e7-8a86-50fa02d41093@linux.intel.com> (raw)
In-Reply-To: <2026040148-cucumber-automatic-9a6b@gregkh>
On 4/1/26 16:38, Greg KH wrote:
> On Wed, Apr 01, 2026 at 12:32:16PM +0000, Guan-Yu Lin wrote:
>> The current USB offload implementation couples the allocation of xHCI
>> sideband interrupters with the device's offload usage counter. This
>> coupling is conceptually incorrect, as hardware resource availability
>> and power management state serve distinct purposes.
>>
>> Furthermore, the reliance on the coarse USB device lock for offload
>> state updates has led to potential recursive locking issues,
>> especially during device disconnect when the lock is already held
>> by the USB core.
>>
>> This series refactors the offload synchronization by introducing a
>> dedicated spinlock for offload state, allowing for more granular
>> concurrency control and avoiding deadlocks. It also optimizes power
>> management by ensuring that offload state is only modified when the
>> device is already active, avoiding unnecessary auto-resumes.
>>
>> Patch 1 introduces the `offload_lock` spinlock and `offload_pm_locked`
>> synchronization, replacing the coarse `udev->lock` and the legacy
>> `offload_at_suspend` flag. It also updates `usb_offload_get/put` to use
>> `pm_runtime_get_if_active()`.
>>
>> Patch 2 removes the implicit usage tracking from the xHCI sideband layer
>> and delegates the responsibility to class drivers, who have the
>> correct context for managing offload data stream activity.
>
> Ok, this looks much better, thanks for the revisions.
>
> If the xhci maintainer acks these, I'll be glad to apply them to my
> tree.
For both patches:
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
prev parent reply other threads:[~2026-04-01 14:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 12:32 [PATCH v4 0/2] usb: offload: Decouple interrupter lifecycle and refactor usage tracking Guan-Yu Lin
2026-04-01 12:32 ` [PATCH v4 1/2] usb: core: use dedicated spinlock for offload state Guan-Yu Lin
2026-04-01 12:32 ` [PATCH v4 2/2] usb: host: xhci-sideband: delegate offload_usage tracking to class drivers Guan-Yu Lin
2026-04-01 13:38 ` [PATCH v4 0/2] usb: offload: Decouple interrupter lifecycle and refactor usage tracking Greg KH
2026-04-01 14:47 ` Mathias Nyman [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=885a239a-9ead-41e7-8a86-50fa02d41093@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=amardeep.rai@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=dominique.martinet@atmark-techno.com \
--cc=eadavis@qq.com \
--cc=gregkh@linuxfoundation.org \
--cc=guanyulin@google.com \
--cc=hannelotta@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=nkapron@google.com \
--cc=perex@perex.cz \
--cc=quic_wcheng@quicinc.com \
--cc=sakari.ailus@linux.intel.com \
--cc=stern@rowland.harvard.edu \
--cc=tiwai@suse.com \
--cc=wesley.cheng@oss.qualcomm.com \
--cc=xiaopei01@kylinos.cn \
--cc=xu.yang_2@nxp.com \
/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