From: Haowen Tu <tuhaowen@uniontech.com>
To: stern@rowland.harvard.edu
Cc: oneukum@suse.com, gregkh@linuxfoundation.org, rafael@kernel.org,
linux-usb@vger.kernel.org, linux-pm@vger.kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
laurent.pinchart@ideasonboard.com, hansg@kernel.org,
mchehab@kernel.org, pavel@kernel.org, lenb@kernel.org,
kernel@uniontech.com
Subject: Re: [RFC] USB/PM: should USB interface drivers distinguish hibernation THAW from RESTORE?
Date: Thu, 30 Apr 2026 10:14:33 +0800 [thread overview]
Message-ID: <20260430021433.2083281-1-tuhaowen@uniontech.com> (raw)
In-Reply-To: <37c9bf07-7b21-403c-b4fe-d54ff6f811db@rowland.harvard.edu>
Hi Oliver, Alan,
Thanks for the feedback.
I think my original RFC title and framing were too narrow.
What originally triggered this discussion was a UVC camera: during the
THAW phase used for hibernation image writeout, the camera's streaming
resume path runs again and can turn the indicator LED back on. From that
observation, I started by looking at the USB side.
But after your replies, I agree that this is not really a USB-specific
problem. The more fundamental question seems to be whether, in the
current S4 flow, resuming the full device set at that point is the
intended model, or whether there is any room for resuming only the
subset of devices needed for image writeout and whatever else must
remain functional during that phase.
So the real issue I wanted to ask about is closer to this:
during hibernation image writeout, should PM resume all previously
frozen devices, or is there any room for a more minimal resume of only
the devices required for writeout and their dependencies?
If writeout succeeds, the system will power off afterward, which made me
wonder whether every previously frozen device must be resumed at that
stage in the same way it would be for ordinary recovery. If not,
avoiding unnecessary resume work in that phase might also reduce the
time spent before final poweroff, although I do not have measurements
for that. On the other hand, if writeout fails, the system needs to
continue running, so the remaining devices would still have to be
recovered correctly. I agree that this failure path makes the problem
much more subtle than I described in the RFC.
I also agree with Oliver's point that this cannot be expressed as
"storage devices only". In practice, any such approach would need to
account for dependencies and for other classes of devices that may still
matter during the writeout phase.
So at this point I am no longer trying to argue for a USB-specific
interface change. Instead, I am trying to understand whether this is a
valid PM/hibernate design question at all, namely whether the writeout
phase should conceptually be treated as:
1. a full THAW of the suspended system, as it is today, or
2. potentially a narrower resume of only the devices needed for
writeout, followed by broader recovery only if writeout fails.
I do not have a concrete implementation in mind yet, and I am not sure
whether such an approach would even fit well with the current PM core
model. I first wanted to check whether this is considered a valid
problem to discuss.
If the answer is that the current full-THAW behavior is simply the
intended model, that is also useful for me. In that case, I should not
treat the UVC behavior as evidence of a missing USB-side mechanism.
Thanks,
Haowen
next prev parent reply other threads:[~2026-04-30 2:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 3:36 [RFC] USB/PM: should USB interface drivers distinguish hibernation THAW from RESTORE? Haowen Tu
2026-04-29 8:42 ` Oliver Neukum
2026-04-29 14:21 ` Alan Stern
2026-04-30 2:14 ` Haowen Tu [this message]
2026-04-30 7:44 ` Oliver Neukum
2026-05-04 1:04 ` Alan Stern
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=20260430021433.2083281-1-tuhaowen@uniontech.com \
--to=tuhaowen@uniontech.com \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=kernel@uniontech.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=oneukum@suse.com \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
--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