public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	rafael.j.wysocki@intel.com, linux-pm@vger.kernel.org
Subject: Re: [PATCH] cpufreq: use last policy after online
Date: Thu, 03 Dec 2015 00:21:37 +0100	[thread overview]
Message-ID: <1505105.R4SaFeI2CM@vostro.rjw.lan> (raw)
In-Reply-To: <1449075405.3240.28.camel@spandruv-desk3.jf.intel.com>

On Wednesday, December 02, 2015 08:56:45 AM Srinivas Pandruvada wrote:
> On Wed, 2015-12-02 at 08:23 +0530, Viresh Kumar wrote:
> > On 01-12-15, 16:52, Srinivas Pandruvada wrote:
> > > For cpufreq drivers which use setpolicy interface, after offline->online
> > > the policy is set to default. This can be reproduced by setting the
> > > default policy of intel_pstate or longrun to ondemand and then change to
> > > "performance". After offline and online, the setpolicy will be called with
> > > the policy=ondemand.
> > > For drivers using governors this condition is handled by storing
> > > last_governor, during offline and restoring during online. The same should
> > > be done for drivers using setpolicy interface. Storing last_policy during
> > > offline and restoring during online.
> > > 
> > > Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> > > ---
> > >  drivers/cpufreq/cpufreq.c | 14 ++++++++++----
> > >  include/linux/cpufreq.h   |  1 +
> > >  2 files changed, 11 insertions(+), 4 deletions(-)
> > 
> > Okay, the problem looks real. But I think it should be solved a bit
> > differently.
> > 
> > Try partly reverting the below commit, so that we can use user_policy
> > instead.
> We have to store somewhere. I can, but my approach matching what using
> governors do to store and restore policy. In this way we have consistent
> processing for has_target() and setpolicy() drivers.

Agreed, consistency matters.

OK, patch queued up for 4.4-rc, thanks!

Rafael


      reply	other threads:[~2015-12-02 22:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02  0:52 [PATCH] cpufreq: use last policy after online Srinivas Pandruvada
2015-12-02  2:05 ` Rafael J. Wysocki
2015-12-02  2:54   ` Viresh Kumar
2015-12-02 22:05   ` Srinivas Pandruvada
2015-12-02 23:08     ` Rafael J. Wysocki
2015-12-02  2:53 ` Viresh Kumar
2015-12-02 16:56   ` Srinivas Pandruvada
2015-12-02 23:21     ` Rafael J. Wysocki [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=1505105.R4SaFeI2CM@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=srinivas.pandruvada@linux.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