[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpo=2xjR=nr5hyMg9bve5_uVbV79R2FTxks0bLmL7kNV9Mg@mail.gmail.com>
Date: Thu, 7 Nov 2013 10:39:38 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Xiaoguang Chen <chenxg@...vell.com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
"cpufreq@...r.kernel.org" <cpufreq@...r.kernel.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Xiaoguang Chen <chenxg.marvell@...il.com>
Subject: Re: [PATCH] cpufreq: conservative: fix requested_freq reduction issue
On 7 November 2013 07:58, Xiaoguang Chen <chenxg@...vell.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@...vell.com>
> ---
> drivers/cpufreq/cpufreq_conservative.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
Good Catch.
Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
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 :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists