[PATCH v5 0/4] PM: hibernate: skip unnecessary THAW resume
From: Haowen Tu
Date: Wed Sep 02 2026 - 22:19:54 EST
During hibernation, after the memory snapshot has been created, the
kernel resumes devices with PMSG_THAW so that the hibernation image can
be written out. Devices that are not involved in image writeout may not
need to be resumed during this transient phase.
Earlier versions handled the UVC case in the driver. Review feedback
pointed out that this does not scale well and that the v4 notifier-based
recovery path does not preserve normal device ordering. This version
moves the skip/recovery handling into the PM core.
The new DPM_FLAG_SKIP_HIBERNATION_THAW flag lets a driver mark a device
that can remain suspended during the post-snapshot image-write phase. If
the original kernel continues running instead of powering down, the PM
core resumes devices skipped this way before userspace is thawed.
The first two patches are unchanged PM fixes/helpers from v3/v4 and keep
Rafael's Acked-by tags. Patch 3 adds the PM core mechanism, and patch 4
marks UVC streaming interfaces with the new flag.
Changes in v5:
- Replace the UVC notifier recovery path with a PM-core-managed skip and
recovery mechanism.
- Add DPM_FLAG_SKIP_HIBERNATION_THAW.
- Use the flag in UVC streaming interfaces.
Haowen Tu (4):
PM: hibernate: clear in_suspend before freeing the snapshot
PM: hibernate: add pm_hibernation_snapshot_done() helper
PM: hibernate: allow devices to skip post-snapshot THAW
media: uvcvideo: skip post-snapshot hibernation THAW
Documentation/driver-api/pm/devices.rst | 17 +++++++
drivers/base/power/main.c | 65 +++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 1 +
include/linux/pm.h | 4 ++
include/linux/suspend.h | 2 +
kernel/power/hibernate.c | 38 ++++++++++++---
6 files changed, 121 insertions(+), 6 deletions(-)
--
2.20.1