Re: [PATCH] PM / suspend: Always use deepest C-state in the "freeze" sleep state

From: Pavel Machek
Date: Fri May 09 2014 - 03:38:46 EST


On Mon 2014-05-05 00:51:54, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> If freeze_enter() is called, we want to bypass the current cpuidle
> governor and always use the deepest available (that is, not disabled)
> C-state, because we want to save as much energy as reasonably possible
> then and runtime latency constraints don't matter at that point, since
> the system is in a sleep state anyway.

Would there be way to pass the parameter "go to deepest" instead of adding
global state for this?
Pavel

> Index: linux-pm/kernel/power/suspend.c
> ===================================================================
> --- linux-pm.orig/kernel/power/suspend.c
> +++ linux-pm/kernel/power/suspend.c
> @@ -54,9 +54,11 @@ static void freeze_begin(void)
>
> static void freeze_enter(void)
> {
> + cpuidle_use_deepest_state(true);
> cpuidle_resume();
> wait_event(suspend_freeze_wait_head, suspend_freeze_wake);
> cpuidle_pause();
> + cpuidle_use_deepest_state(false);
> }
>
> void freeze_wake(void)
>
> --
> 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/

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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/