lkml.org 
[lkml]   [2015]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] suspend: delete sys_sync()
Date
From: Len Brown <len.brown@intel.com>

Remove sys_sync() from the kernel's suspend flow.

sys_sync() is extremely expensive in some configurations,
and so the kernel should not force users to pay this cost
on every suspend.

The user-space utilities s2ram and s2disk choose to invoke sync() today.
A user can invoke suspend directly via /sys/power/state to skip that cost.

Signed-off-by: Len Brown <len.brown@intel.com>
---
kernel/power/suspend.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index b7d6b3a..6d237bb 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -473,12 +473,6 @@ static int enter_state(suspend_state_t state)
if (state == PM_SUSPEND_FREEZE)
freeze_begin();

- trace_suspend_resume(TPS("sync_filesystems"), 0, true);
- printk(KERN_INFO "PM: Syncing filesystems ... ");
- sys_sync();
- printk("done.\n");
- trace_suspend_resume(TPS("sync_filesystems"), 0, false);
-
pr_debug("PM: Preparing system for %s sleep\n", pm_states[state]);
error = suspend_prepare(state);
if (error)
--
2.4.0.rc1


\
 
 \ /
  Last update: 2015-05-08 09:21    [W:0.135 / U:3.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site