public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Xiaoguang Chen <chenxg@marvell.com>,
	"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Xiaoguang Chen <chenxg.marvell@gmail.com>
Subject: Re: [PATCH] cpufreq: conservative: fix requested_freq reduction issue
Date: Thu, 07 Nov 2013 19:57:41 +0100	[thread overview]
Message-ID: <4433736.xh14GOaN7a@vostro.rjw.lan> (raw)
In-Reply-To: <CAKohpo=2xjR=nr5hyMg9bve5_uVbV79R2FTxks0bLmL7kNV9Mg@mail.gmail.com>

On Thursday, November 07, 2013 10:39:38 AM Viresh Kumar wrote:
> On 7 November 2013 07:58, Xiaoguang Chen <chenxg@marvell.com> wrote:
> > When decreasing frequency, requested_freq may be less than
> > freq_target, So requested_freq minus freq_target may be negative,
> > But reqested_freq's unit is unsigned int, then the negative result
> > will be one larger interger which may be even higher than
> > requested_freq.
> >
> > This patch is to fix such issue. when result becomes negative,
> > set requested_freq as the min value of policy.
> >
> > Signed-off-by: Xiaoguang Chen <chenxg@marvell.com>
> > ---
> >  drivers/cpufreq/cpufreq_conservative.c | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> Good Catch.
> 
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

Applied, thanks!

> We need another patch for fixing the other part of code where we
> increase freq..
> We need to replace:
> 
> if (dbs_info->requested_freq == policy->max)
>     return;
> 
> with
> 
> if (dbs_info->requested_freq >= policy->max)
>     return;
> 
> So, that we don't run unnecessary code :)

Care to prepare a patch?

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2013-11-07 18:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-07  2:28 [PATCH] cpufreq: conservative: fix requested_freq reduction issue Xiaoguang Chen
2013-11-07  5:09 ` Viresh Kumar
2013-11-07 18:57   ` Rafael J. Wysocki [this message]
2013-11-08  4:47     ` Viresh Kumar
     [not found]   ` <CADmjqpNWYVxrXuo106rBuZeZ2BrkGFkmbMJ8jxi39c8kLiQ+iw@mail.gmail.com>
2013-11-08  4:55     ` Viresh Kumar
2013-11-08  5:01       ` Xiaoguang Chen
2013-11-08  5:06         ` Viresh Kumar
2013-11-08  5:14           ` Xiaoguang Chen
2013-11-08 17:43       ` Stratos Karafotis
2013-11-08 18:16         ` Viresh Kumar
2013-11-08 19:29           ` Stratos Karafotis
2013-11-11  4:43             ` Viresh Kumar

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=4433736.xh14GOaN7a@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=chenxg.marvell@gmail.com \
    --cc=chenxg@marvell.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --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