Thread (5 messages) 5 messages, 2 authors, 2022-08-25
STALE1373d

[PATCH] PM: suspend: select SUSPEND_SKIP_SYNC too if PM_USERSPACE_AUTOSLEEP is selected

From: Juhyung Park <hidden>
Date: 2022-08-24 04:41:08
Also in: chrome-platform, linux-f2fs-devel, linux-fsdevel
Subsystem: hibernation (aka software suspend, aka swsusp), suspend to ram, the rest · Maintainers: "Rafael J. Wysocki", Linus Torvalds

Commit 2fd77fff4b44 ("PM / suspend: make sync() on suspend-to-RAM build-time
optional") added an option to skip sync() on suspend entry to avoid heavy
overhead on platforms with frequent suspends.

Years later, commit 261e224d6a5c ("pm/sleep: Add PM_USERSPACE_AUTOSLEEP
Kconfig") added a dedicated config for indicating that the kernel is subject to
frequent suspends.

While SUSPEND_SKIP_SYNC is also available as a knob that the userspace can
configure, it makes sense to enable this by default if PM_USERSPACE_AUTOSLEEP
is selected already.

Signed-off-by: Juhyung Park <redacted>
---
 kernel/power/Kconfig | 1 +
 1 file changed, 1 insertion(+)
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 60a1d3051cc7..5725df6c573b 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -23,6 +23,7 @@ config SUSPEND_SKIP_SYNC
 	bool "Skip kernel's sys_sync() on suspend to RAM/standby"
 	depends on SUSPEND
 	depends on EXPERT
+	default PM_USERSPACE_AUTOSLEEP
 	help
 	  Skip the kernel sys_sync() before freezing user processes.
 	  Some systems prefer not to pay this cost on every invocation
-- 
2.37.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help