From: Samuel Wu <wusamuel@google.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Pavel Machek <pavel@kernel.org>, Len Brown <lenb@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Danilo Krummrich <dakr@kernel.org>
Cc: Samuel Wu <wusamuel@google.com>,
kernel-team@android.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/3] PM: Support aborting suspend during filesystem sync
Date: Wed, 20 Aug 2025 17:42:32 -0700 [thread overview]
Message-ID: <20250821004237.2712312-1-wusamuel@google.com> (raw)
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
next reply other threads:[~2025-08-21 0:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 0:42 Samuel Wu [this message]
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
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=20250821004237.2712312-1-wusamuel@google.com \
--to=wusamuel@google.com \
--cc=dakr@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
/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
all inboxes | Powered by JetHome®