mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: "Toralf Förster" <toralf.foerster@gmx.de>,
	"Viresh Kumar" <viresh.kumar@linaro.org>,
	cpufreq@vger.kernel.org,
	"Linux PM list" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpufreq: Fix cpufreq regression after suspend/resume
Date: Mon, 01 Jul 2013 00:46:03 +0200	[thread overview]
Message-ID: <19337614.Mnu5DqParj@vostro.rjw.lan> (raw)
In-Reply-To: <51D07E7F.2030709@linux.vnet.ibm.com>

On Monday, July 01, 2013 12:22:47 AM Srivatsa S. Bhat wrote:
> On 06/30/2013 10:35 PM, Toralf Förster wrote:
> > On 06/30/2013 06:33 PM, Srivatsa S. Bhat wrote:
> >> Toralf, can you please
> >> try out the below patch and see if it improves anything? (Don't revert anything,
> >> just apply the below diff on a problematic kernel and see if it solves your
> >> issue).
> > 
> > applied on top of a66b2e5 - issue went away (either fixed or hidden now)
> > 
> 
> Cool! So here is the proper patch, with changelog added.
> 
> Regards,
> Srivatsa S. Bhat
> 
> 
> -----------------------------------------------------------------------------
> 
> From: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> Subject: [PATCH] cpufreq: Fix cpufreq regression after suspend/resume
> 
> Toralf Förster reported that the cpufreq ondemand governor behaves erratically
> (doesn't scale well) after a suspend/resume cycle. The problem was that the
> cpufreq subsystem's idea of the cpu frequencies differed from the actual
> frequencies set in the hardware after a suspend/resume cycle. Toralf bisected
> the problem to commit a66b2e5 (cpufreq: Preserve sysfs files across
> suspend/resume).
> 
> Among other (harmless) things, that commit skipped the call to
> cpufreq_update_policy() in the resume path. But cpufreq_update_policy() plays
> an important role during resume, because it is responsible for checking if
> the BIOS changed the cpu frequencies behind our back and resynchronize the
> cpufreq subsystem's knowledge of the cpu frequencies, and update them
> accordingly.
> 
> So, restore the call to cpufreq_update_policy() in the resume path to fix
> the cpufreq regression.
> 
> Reported-by: Toralf Förster <toralf.foerster@gmx.de>
> Tested-by: Toralf Förster <toralf.foerster@gmx.de>
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>

Thanks Srivatsa, I'll queue it up as 3.11 (and 3.10-stable) material.

Thanks,
Rafael


> ---
> 
>  drivers/cpufreq/cpufreq_stats.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
> index fb65dec..591b6fb 100644
> --- a/drivers/cpufreq/cpufreq_stats.c
> +++ b/drivers/cpufreq/cpufreq_stats.c
> @@ -349,6 +349,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
>  
>  	switch (action) {
>  	case CPU_ONLINE:
> +	case CPU_ONLINE_FROZEN:
>  		cpufreq_update_policy(cpu);
>  		break;
>  	case CPU_DOWN_PREPARE:
> 
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2013-06-30 22:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <51C08370.4050906@gmx.de>
     [not found] ` <CAKohpok1gThXL925Yz5UgC54vTVQgymBA1cLGER_g-dgZu0JLA@mail.gmail.com>
     [not found]   ` <51CF1E53.6060902@gmx.de>
     [not found]     ` <8029836.CFiJCXmRQ0@vostro.rjw.lan>
     [not found]       ` <51D05DF4.50704@linux.vnet.ibm.com>
     [not found]         ` <51D06556.7080204@gmx.de>
2013-06-30 18:52           ` Srivatsa S. Bhat
2013-06-30 22:46             ` Rafael J. Wysocki [this message]
2013-07-10 20:50             ` Toralf Förster
2013-07-10 22:29               ` Srivatsa S. Bhat
2013-07-11  5:40                 ` Lan Tianyu
2013-07-11  6:23                   ` Srivatsa S. Bhat
2013-07-11 14:03                     ` Lan Tianyu
2013-07-11 14:24                       ` Srivatsa S. Bhat
2013-07-11 14:23                     ` Alan Stern
2013-07-11 14:38                       ` Srivatsa S. Bhat
2013-07-13 10:16               ` Paul Bolle
2013-07-13 12:52                 ` Paul Bolle
2013-07-15  6:13                   ` Srivatsa S. Bhat

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=19337614.Mnu5DqParj@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=toralf.foerster@gmx.de \
    --cc=viresh.kumar@linaro.org \
    /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

all inboxes | Powered by JetHome®