[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: Revert "cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC"
From: "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date: 2016-04-30 0:48:59
Message-ID: 20160430004859.B98C4660F83 () gitolite ! kernel ! org
[Download RAW message or body]
Web: https://git.kernel.org/torvalds/c/94862a62dfe3ba1c7601115a2dc80721c5b256f0
Commit: 94862a62dfe3ba1c7601115a2dc80721c5b256f0
Parent: c9d9c929e6741118776eb0f385339d3c2b84d5f8
Refname: refs/heads/master
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
AuthorDate: Thu Apr 21 20:57:47 2016 +0200
Committer: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
CommitDate: Mon Apr 25 02:39:20 2016 +0200
Revert "cpufreq: governor: Fix negative idle_time when configured with \
CONFIG_HZ_PERIODIC"
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>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cpufreq_governor.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
index 10a5cfe..5f1147f 100644
--- a/drivers/cpufreq/cpufreq_governor.c
+++ b/drivers/cpufreq/cpufreq_governor.c
@@ -193,12 +193,8 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
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];
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic