From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Lan Tianyu <tianyu.lan@intel.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Dirk Brandewie <dirk.j.brandewie@intel.com>
Subject: Re: [PATCH 1/1] Cpufreq: Keep cpufreq sysfs nodes across S2RAM/S2DISK when using intel_pstate driver.
Date: Tue, 30 Sep 2014 01:44:05 +0200 [thread overview]
Message-ID: <5318779.3lMVbcv1i3@vostro.rjw.lan> (raw)
In-Reply-To: <CAKohpokht4=7XCftPYa5PqpPMN-O-5b_RjJ3BgHnxjYV4VzyTg@mail.gmail.com>
On Monday, September 29, 2014 01:20:44 AM Viresh Kumar wrote:
> Sorry for being late on this. Was away for a week for Linaro Connect followed
> by a week of vacations :(
>
> On 18 September 2014 00:03, Lan Tianyu <tianyu.lan@intel.com> wrote:
> > Cpufreq core introduces cpufreq_suspended flag to let cpufreq sysfs nodes
> > across S2RAM/S2DISK. But the flag is only set in the cpufreq_suspend()
> > for cpufreq drivers which have target or target_index callback. This
> > skips intel_pstate driver. This patch is to set the flag before checking
> > target or target_index callback.
>
> Oh yes, this looks to be the right thing to do..
>
> > Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
> > ---
> > drivers/cpufreq/cpufreq.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> > index d9fdedd..eb9bb78 100644
> > --- a/drivers/cpufreq/cpufreq.c
> > +++ b/drivers/cpufreq/cpufreq.c
> > @@ -1656,6 +1656,8 @@ void cpufreq_suspend(void)
> > if (!cpufreq_driver)
> > return;
> >
> > + cpufreq_suspended = true;
> > +
> > if (!has_target())
> > return;
> >
> > @@ -1670,8 +1672,6 @@ void cpufreq_suspend(void)
> > pr_err("%s: Failed to suspend driver: %p\n", __func__,
> > policy);
> > }
> > -
> > - cpufreq_suspended = true;
>
> But this change is buggy.. Because you are updating 'cpufreq_suspended'
> before actually stopping the governor, any calls to __cpufreq_governor()
> will be converted to NO-operations because of this in __cpufreq_governor():
>
> /* Don't start any governor operations if we are entering suspend */
> if (cpufreq_suspended)
> return 0;
>
> And so the governor's will never stop :(
>
> So you need to keep the above line where it was :)
OK, so please send a fix for that against the Linus' tree.
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
next prev parent reply other threads:[~2014-09-29 23:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 7:03 Lan Tianyu
2014-09-22 14:07 ` Rafael J. Wysocki
2014-09-29 8:20 ` Viresh Kumar
2014-09-29 23:44 ` Rafael J. Wysocki [this message]
2014-10-08 6:48 ` Lan Tianyu
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=5318779.3lMVbcv1i3@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=dirk.j.brandewie@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=tianyu.lan@intel.com \
--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®