From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Chen Yu <yu.c.chen@intel.com>,
Timo Valtoaho <timo.valtoaho@gmail.com>
Subject: Re: [PATCH] Revert "cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC"
Date: Fri, 22 Apr 2016 09:03:07 +0530 [thread overview]
Message-ID: <20160422033307.GQ29799@vireshk-i7> (raw)
In-Reply-To: <8912976.5IbnMFmJ9d@vostro.rjw.lan>
On 21-04-16, 20:57, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Revert commit 0df35026c6a5 (cpufreq: governor: Fix negative idle_time
> when configured with CONFIG_HZ_PERIODIC) that introduced a regression
> by causing the ondemand cpufreq governor to misbehave for
> CONFIG_TICK_CPU_ACCOUNTING unset (the frequency goes up to the max at
> one point and stays there indefinitely).
>
> The revert takes subsequent modifications of the code in question into
> account.
>
> Fixes: 0df35026c6a5 (cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC)
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=115261
> Reported-and-tested-by: Timo Valtoaho <timo.valtoaho@gmail.com>
> Cc: 4.5+ <stable@vger.kernel.org> # 4.5+
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/cpufreq/cpufreq_governor.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> Index: linux-pm/drivers/cpufreq/cpufreq_governor.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq_governor.c
> +++ linux-pm/drivers/cpufreq/cpufreq_governor.c
> @@ -146,12 +146,8 @@ unsigned int dbs_update(struct cpufreq_p
> wall_time = cur_wall_time - j_cdbs->prev_cpu_wall;
> j_cdbs->prev_cpu_wall = cur_wall_time;
>
> - if (cur_idle_time <= j_cdbs->prev_cpu_idle) {
> - idle_time = 0;
> - } else {
> - idle_time = cur_idle_time - j_cdbs->prev_cpu_idle;
> - j_cdbs->prev_cpu_idle = cur_idle_time;
> - }
> + idle_time = cur_idle_time - j_cdbs->prev_cpu_idle;
> + j_cdbs->prev_cpu_idle = cur_idle_time;
>
> if (ignore_nice) {
> u64 cur_nice = kcpustat_cpu(j).cpustat[CPUTIME_NICE];
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
prev parent reply other threads:[~2016-04-22 3:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-21 18:57 [PATCH] Revert "cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC" Rafael J. Wysocki
2016-04-22 3:33 ` Viresh Kumar [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=20160422033307.GQ29799@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=timo.valtoaho@gmail.com \
--cc=yu.c.chen@intel.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