lkml.org 
[lkml]   [2013]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] cpufreq: conservative: fix requested_freq reduction issue
Date
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.


\
 
 \ /
  Last update: 2013-11-07 20:21    [W:0.070 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site