Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1497579 > unrolled thread

v4.8 cpufreq regression?

Started byAaro Koskinen <aaro.koskinen@iki.fi>
First post2016-10-08 01:00 +0200
Last post2016-10-12 05:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  v4.8 cpufreq regression? Aaro Koskinen <aaro.koskinen@iki.fi> - 2016-10-08 01:00 +0200
    [PATCH] cpufreq: skip invalid entries when searching the frequency Aaro Koskinen <aaro.koskinen@iki.fi> - 2016-10-10 23:40 +0200
      Re: [PATCH] cpufreq: skip invalid entries when searching the  frequency Viresh Kumar <viresh.kumar@linaro.org> - 2016-10-12 05:20 +0200

#1497579 — v4.8 cpufreq regression?

FromAaro Koskinen <aaro.koskinen@iki.fi>
Date2016-10-08 01:00 +0200
Subjectv4.8 cpufreq regression?
Message-ID<spMhs-749-7@gated-at.bofh.it>
Hi,

I'm upgrading from v4.7 to v4.8 on MIPS/loongson2_cpufreq with
cpufreq/ondemand and I noticed that /proc/cpuinfo is always reporting
(regardless of system load):

BogoMIPS                : 697150.20

	and sysfs:

/sys/devices/system/cpu/cpufreq/policy0/affected_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq:797800
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq:797800
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_min_freq:199450
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_transition_latency:0
/sys/devices/system/cpu/cpufreq/policy0/related_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies:199450 299175 398900 498625 598350 698075 797800 
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors:ondemand performance 
/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq:797800
/sys/devices/system/cpu/cpufreq/policy0/scaling_driver:loongson2
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:ondemand
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:797800
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:199450
/sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed:<unsupported>

although previously they reported (when idle):

BogoMIPS                : 132.09

/sys/devices/system/cpu/cpufreq/policy0/affected_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq:199445
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq:797780
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_min_freq:199445
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_transition_latency:0
/sys/devices/system/cpu/cpufreq/policy0/related_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies:199445 299167 398890 498612 598335 698057 797780 
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors:ondemand performance 
/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq:199445
/sys/devices/system/cpu/cpufreq/policy0/scaling_driver:loongson2
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:ondemand
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:797780
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:199445
/sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed:<unsupported>

and under full load:

BogoMIPS                : 528.38

/sys/devices/system/cpu/cpufreq/policy0/affected_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq:797780
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq:797780
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_min_freq:199445
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_transition_latency:0
/sys/devices/system/cpu/cpufreq/policy0/related_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies:199445 299167 398890 498612 598335 698057 797780 
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors:ondemand performance 
/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq:797780
/sys/devices/system/cpu/cpufreq/policy0/scaling_driver:loongson2
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:ondemand
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:797780
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:199445
/sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed:<unsupported>

The offeding commit (bisected) seems to be:

commit da0c6dc00c69d0adaae99c3b3d2ea0c869a3fb35
Author: Viresh Kumar <viresh.kumar@linaro.org>
Date:   Mon Jun 27 16:04:07 2016 +0530

    cpufreq: Handle sorted frequency tables more efficiently

Any ideas?

A.

[toc] | [next] | [standalone]


#1498538 — [PATCH] cpufreq: skip invalid entries when searching the frequency

FromAaro Koskinen <aaro.koskinen@iki.fi>
Date2016-10-10 23:40 +0200
Subject[PATCH] cpufreq: skip invalid entries when searching the frequency
Message-ID<sqQsF-6lg-7@gated-at.bofh.it>
In reply to#1497579
Skip invalid entries when searching the frequency. This fixes cpufreq
at least on loongson2 MIPS board.

Fixes: da0c6dc00c69 ("cpufreq: Handle sorted frequency tables more efficiently")
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 include/linux/cpufreq.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 631ba33b..0c1b188 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -645,6 +645,9 @@ static inline int cpufreq_table_find_index_al(struct cpufreq_policy *policy,
 	for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
 		freq = table[i].frequency;
 
+		if (freq == CPUFREQ_ENTRY_INVALID)
+			continue;
+
 		if (freq >= target_freq)
 			return i;
 
@@ -665,6 +668,9 @@ static inline int cpufreq_table_find_index_dl(struct cpufreq_policy *policy,
 	for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
 		freq = table[i].frequency;
 
+		if (freq == CPUFREQ_ENTRY_INVALID)
+			continue;
+
 		if (freq == target_freq)
 			return i;
 
@@ -706,6 +712,9 @@ static inline int cpufreq_table_find_index_ah(struct cpufreq_policy *policy,
 	for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
 		freq = table[i].frequency;
 
+		if (freq == CPUFREQ_ENTRY_INVALID)
+			continue;
+
 		if (freq == target_freq)
 			return i;
 
@@ -735,6 +744,9 @@ static inline int cpufreq_table_find_index_dh(struct cpufreq_policy *policy,
 	for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
 		freq = table[i].frequency;
 
+		if (freq == CPUFREQ_ENTRY_INVALID)
+			continue;
+
 		if (freq <= target_freq)
 			return i;
 
@@ -767,6 +779,9 @@ static inline int cpufreq_table_find_index_ac(struct cpufreq_policy *policy,
 	for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
 		freq = table[i].frequency;
 
+		if (freq == CPUFREQ_ENTRY_INVALID)
+			continue;
+
 		if (freq == target_freq)
 			return i;
 
@@ -800,6 +815,9 @@ static inline int cpufreq_table_find_index_dc(struct cpufreq_policy *policy,
 	for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
 		freq = table[i].frequency;
 
+		if (freq == CPUFREQ_ENTRY_INVALID)
+			continue;
+
 		if (freq == target_freq)
 			return i;
 
-- 
2.9.2

[toc] | [prev] | [next] | [standalone]


#1499334 — Re: [PATCH] cpufreq: skip invalid entries when searching the frequency

FromViresh Kumar <viresh.kumar@linaro.org>
Date2016-10-12 05:20 +0200
SubjectRe: [PATCH] cpufreq: skip invalid entries when searching the frequency
Message-ID<srifg-74U-5@gated-at.bofh.it>
In reply to#1498538
On 11-10-16, 00:38, Aaro Koskinen wrote:
> Skip invalid entries when searching the frequency. This fixes cpufreq
> at least on loongson2 MIPS board.
> 
> Fixes: da0c6dc00c69 ("cpufreq: Handle sorted frequency tables more efficiently")
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> ---
>  include/linux/cpufreq.h | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)

Hi Aaro,

I have sent a new version of this patch, but screwed up the
--in-reply-to somehow.. Can you please give that a try?

-- 
viresh

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web