linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Sai Gurrappadi <sgurrappadi@nvidia.com>
Cc: rafael.j.wysocki@intel.com, linux-pm@vger.kernel.org,
	MLongnecker@nvidia.com
Subject: Re: [PATCHv2] cpufreq: Fix GOV_LIMITS handling for the userspace governor
Date: Mon, 2 May 2016 07:37:24 +0530	[thread overview]
Message-ID: <20160502020724.GD2855@vireshk-i7> (raw)
In-Reply-To: <5723D5C5.9030900@nvidia.com>

On 29-04-16, 14:44, Sai Gurrappadi wrote:
> Currently, the userspace governor only updates frequency on GOV_LIMITS
> if policy->cur falls outside policy->{min/max}. However, it is also
> necessary to update current frequency on GOV_LIMITS to match the user
> requested value if it can be achieved within the new policy->{max/min}.
> 
> This was previously the behaviour in the governor until commit d1922f0
> ("cpufreq: Simplify userspace governor") which incorrectly assumed that
> policy->cur == user requested frequency via scaling_setspeed. This won't
> be true if the user requested frequency falls outside policy->{min/max}.
> Ex: a temporary thermal cap throttled the user requested frequency.
> 
> Fix this by storing the user requested frequency in a seperate variable.
> The governor will then try to achieve this request on every GOV_LIMITS
> change.
> 
> Fixes: d1922f02562f ("cpufreq: Simplify userspace governor")
> 
> Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
> ---
> 
> Changes in v2:
> - Used policy->governor_data rather than using a per-cpu variable
> 
>  drivers/cpufreq/cpufreq_userspace.c | 43 ++++++++++++++++++++++++++++++++-----
>  1 file changed, 38 insertions(+), 5 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

  reply	other threads:[~2016-05-02  2:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29 21:44 [PATCHv2] cpufreq: Fix GOV_LIMITS handling for the userspace governor Sai Gurrappadi
2016-05-02  2:07 ` Viresh Kumar [this message]
2016-05-05 16:53   ` Sai Gurrappadi
2016-05-05 21:24     ` Rafael J. Wysocki
2016-05-05 21:36       ` Sai Gurrappadi

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=20160502020724.GD2855@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=MLongnecker@nvidia.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=sgurrappadi@nvidia.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).