mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/3] PM: Support aborting suspend during filesystem sync
@ 2025-08-21  0:42 Samuel Wu
  2025-08-21  0:42 ` [PATCH v3 1/3] PM: Make pm_wakeup_clear() call more clear Samuel Wu
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Samuel Wu @ 2025-08-21  0:42 UTC (permalink / raw)
  To: Rafael J. Wysocki, Pavel Machek, Len Brown, Greg Kroah-Hartman,
	Danilo Krummrich
  Cc: Samuel Wu, kernel-team, linux-pm, linux-kernel

This series adds functionality to handle a wakeup event in the filesystem
sync phase of suspend. 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.

1/3: Moves pm_wakeup_clear() to be with similar functions that do the
     prerequisite bookkeeping prior to suspend_prepare(), making the intent
     of the function clearer. Additionally, this sets up patch2 in the
     series, which requires pm_wakeup_clear() to be called before abort
     functionality during suspend can be enabled.
2/3: Add support for abort during filesystem sync phase of suspend. This
     requires detecting a wakeup event or a filesystem sync finishing,
     whichever comes first.
3/3: Adding onto abort during filesystem sync, handle cases of back-to-back
     suspends and their respective filesystem syncs. Extra care is needed
     to ensure filesystem syncs happen serially while still honoring
     wakeup events that lead to early aborts.

[1]: https://lpc.events/event/18/contributions/1845/

Changes in v3:
- Split v2 patch into 3 patches
- Moved pm_wakeup_clear() outside of if(sync_on_suspend_enabled) condition
- Updated documentation and comments within kernel/power/suspend.c
- v2 link: https://lore.kernel.org/all/20250812232126.1814253-1-wusamuel@google.com/

Changes in v2:
- Added documentation for suspend_abort_fs_sync()
- Made suspend_fs_sync_lock and suspend_fs_sync_complete declaration static
- v1 link: https://lore.kernel.org/all/20250815004635.3684650-1-wusamuel@google.com

Samuel Wu (3):
  PM: Make pm_wakeup_clear() call more clear
  PM: Support aborting suspend during filesystem sync
  PM: Support abort during fs_sync of back-to-back suspends

 drivers/base/power/wakeup.c |  8 ++++
 include/linux/suspend.h     |  3 ++
 kernel/power/process.c      |  1 -
 kernel/power/suspend.c      | 75 ++++++++++++++++++++++++++++++++++++-
 4 files changed, 85 insertions(+), 2 deletions(-)

-- 
2.51.0.261.g7ce5a0a67e-goog


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-09-09  1:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-21  0:42 [PATCH v3 0/3] PM: Support aborting suspend during filesystem sync Samuel Wu
2025-08-21  0:42 ` [PATCH v3 1/3] PM: Make pm_wakeup_clear() call more clear Samuel Wu
2025-09-04 19:06   ` Rafael J. Wysocki
2025-08-21  0:42 ` [PATCH v3 2/3] PM: Support aborting suspend during filesystem sync Samuel Wu
2025-09-04 19:22   ` Rafael J. Wysocki
2025-09-05  5:07     ` Saravana Kannan
2025-09-05  9:38       ` Rafael J. Wysocki
2025-09-09  1:41         ` Saravana Kannan
2025-08-21  0:42 ` [PATCH v3 3/3] PM: Support abort during fs_sync of back-to-back suspends Samuel Wu
2025-08-21  6:45   ` Saravana Kannan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®