Re: [PATCH v7 0/2] PM: Support aborting sleep during filesystem sync

From: Rafael J. Wysocki

Date: Thu Nov 20 2025 - 16:35:21 EST


On Wed, Nov 19, 2025 at 6:14 PM Samuel Wu <wusamuel@xxxxxxxxxx> wrote:
>
> At the start of suspend and hibernate, filesystems will sync to save the
> current state of the device. However, the long tail of the filesystem
> sync can take upwards of 25 seconds. If during this filesystem sync
> there is some wakeup signal, it will not be processed until the sync is
> complete; from a user's perspective, this looks like the device is
> unresponsive to any form of input.
>
> This patch adds functionality to handle a sleep abort signal when in
> the filesystem sync phase of suspend or hibernate. This topic was first
> discussed by Saravana Kannan at LPC 2024 [1], where the general
> consensus was to allow filesystem sync on a parallel thread. In case of
> a wakeup signal, the suspend process will stop waiting on an in-progress
> filesystem sync, and instead abort suspend before the filesystem sync is
> complete.
>
> Furthermore, in the case of the back-to-back sleeps, a subsequent
> filesystem sync is enqueued to ensure the latest files are synced right
> before sleep. The framework still allows for an early abort in this case.
>
> [1]: https://lpc.events/event/18/contributions/1845/
>
> Suggested-by: Saravana Kannan <saravanak@xxxxxxxxxx>
> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> Signed-off-by: Samuel Wu <wusamuel@xxxxxxxxxx>
>
> Samuel Wu (2):
> PM: Add framework to abort during fs_sync
> PM: Call pm_sleep_fs_sync() instead of ksys_sync_helper()

Both patches applied as 6.19 material with updated subjects and
changelogs, thanks!