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

From: Pavel Machek
Date: Fri May 09 2014 - 10:14:13 EST


On Fri 2014-05-09 13:26:47, Rafael J. Wysocki wrote:
> On Friday, May 09, 2014 09:38:35 AM Pavel Machek wrote:
> > 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?
>
> I'm not sure what you mean? A parameter of what in particular? And where
> to pass it?

Currently the code is:

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

. I believe it would be better if you did

cpuidle_resume(GOTO_DEEPEST_C_STATE)

instead of having global state.

Thanks,
Pavel
--
(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/