[PATCH 1/1] suspend: delete sys_sync()

From: Len Brown
Date: Fri May 08 2015 - 03:08:59 EST

From: Len Brown <len.brown@xxxxxxxxx>

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@xxxxxxxxx>
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)

- 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)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/