From: Preeti U Murthy <preeti@linux.vnet.ibm.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Zhang Rui <rui.zhang@intel.com>, Aubrey Li <aubrey.li@intel.com>
Subject: Re: [PATCH] PM / suspend: Make cpuidle work in the "freeze" state
Date: Mon, 21 Apr 2014 12:23:54 +0530 [thread overview]
Message-ID: <5354C082.6020908@linux.vnet.ibm.com> (raw)
In-Reply-To: <4271849.XeOTooWnSN@vostro.rjw.lan>
On 04/21/2014 03:13 AM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The "freeze" system sleep state introduced by commit 7e73c5ae6e79
> (PM: Introduce suspend state PM_SUSPEND_FREEZE) requires cpuidle
> to be functional when freeze_enter() is executed to work correctly
> (that is, to be able to save any more energy than runtime idle),
> but that is impossible after commit 8651f97bd951d (PM / cpuidle:
> System resume hang fix with cpuidle) which caused cpuidle to be
> paused in dpm_suspend_noirq() and resumed in dpm_resume_noirq().
>
> To avoid that problem, add cpuidle_resume() and cpuidle_pause()
> to the beginning and the end of freeze_enter(), respectively.
>
> Reported-by: Zhang Rui <rui.zhang@intel.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> kernel/power/suspend.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> Index: linux-pm/kernel/power/suspend.c
> ===================================================================
> --- linux-pm.orig/kernel/power/suspend.c
> +++ linux-pm/kernel/power/suspend.c
> @@ -14,6 +14,7 @@
> #include <linux/init.h>
> #include <linux/console.h>
> #include <linux/cpu.h>
> +#include <linux/cpuidle.h>
> #include <linux/syscalls.h>
> #include <linux/gfp.h>
> #include <linux/io.h>
> @@ -53,7 +54,9 @@ static void freeze_begin(void)
>
> static void freeze_enter(void)
> {
> + cpuidle_resume();
> wait_event(suspend_freeze_wait_head, suspend_freeze_wake);
> + cpuidle_pause();
> }
>
> void freeze_wake(void)
>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
prev parent reply other threads:[~2014-04-21 6:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-20 21:43 [PATCH] PM / suspend: Make cpuidle work in the "freeze" state Rafael J. Wysocki
2014-04-21 6:53 ` Preeti U Murthy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5354C082.6020908@linux.vnet.ibm.com \
--to=preeti@linux.vnet.ibm.com \
--cc=aubrey.li@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).