Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't switch consoles or sync on suspend.
Neither of these actions are really needed and can slow suspend
down, so disable them.

This should probably be configurable...

Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
neilbrown committed Mar 30, 2012
1 parent d54bc14 commit 1dcf9f5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kernel/power/suspend.c
Expand Up @@ -95,7 +95,7 @@ static int suspend_prepare(void)
if (!suspend_ops || !suspend_ops->enter)
return -EPERM;

pm_prepare_console();
// pm_prepare_console();

error = pm_notifier_call_chain(PM_SUSPEND_PREPARE);
if (error)
Expand All @@ -114,7 +114,7 @@ static int suspend_prepare(void)
usermodehelper_enable();
Finish:
pm_notifier_call_chain(PM_POST_SUSPEND);
pm_restore_console();
// pm_restore_console();
return error;
}

Expand Down Expand Up @@ -261,7 +261,7 @@ static void suspend_finish(void)
suspend_thaw_processes();
usermodehelper_enable();
pm_notifier_call_chain(PM_POST_SUSPEND);
pm_restore_console();
// pm_restore_console();
}

/**
Expand All @@ -284,9 +284,9 @@ int enter_state(suspend_state_t state)
if (!mutex_trylock(&pm_mutex))
return -EBUSY;

printk(KERN_INFO "PM: Syncing filesystems ... ");
sys_sync();
printk("done.\n");
printk(KERN_INFO "PM: NOT Syncing filesystems ... ");
// sys_sync();
// printk("done.\n");

pr_debug("PM: Preparing system for %s sleep\n", pm_states[state]);
error = suspend_prepare();
Expand Down

0 comments on commit 1dcf9f5

Please sign in to comment.