Bug 153221 - failing to set governor with cpupower-frequency-set
Summary: failing to set governor with cpupower-frequency-set
Status: CLOSED INVALID
Alias: None
Product: Power Management
Classification: Unclassified
Component: cpufreq (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: Thomas Renninger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-16 14:34 UTC by foudil.newbie+linux
Modified: 2016-11-21 15:28 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.7.0-1-ARCH
Subsystem:
Regression: No
Bisected commit-id:


Attachments
cpupower-frequency-set patch (905 bytes, patch)
2016-08-16 14:34 UTC, foudil.newbie+linux
Details | Diff

Description foudil.newbie+linux 2016-08-16 14:34:21 UTC
Created attachment 229121 [details]
cpupower-frequency-set patch

cpupower frequency-set -g performance

has no effect.
I think this is due to a bug introduced by ac5a181d065d74fb:

@@ -298,3 +298,3 @@ int cmd_freq_set(int argc, char **argv)
                        if (!bitmask_isbitset(cpus_chosen, cpu) ||
-                           cpufreq_cpu_exists(cpu))
+                           cpupower_is_cpu_online(cpu))
                                continue;
@@ -318,6 +318,6 @@ int cmd_freq_set(int argc, char **argv)
                if (!bitmask_isbitset(cpus_chosen, cpu) ||
-                   cpufreq_cpu_exists(cpu))
+                   cpupower_is_cpu_online(cpu))
                        continue;
 
-               if (sysfs_is_cpu_online(cpu) != 1)
+               if (cpupower_is_cpu_online(cpu) != 1)
                        continue;

The two functions cpufreq_cpu_exists() and sysfs_is_cpu_online() were replaced by cpupower_is_cpu_online(), which is misused in the first test.

I'm proposing a patch in attachment.
Comment 1 Chen Yu 2016-08-25 03:11:23 UTC
@Thomas, would you please help take a look? thanks.
Comment 2 Chen Yu 2016-10-10 15:22:29 UTC
foudil, please send the patch to Thomas, and this bugzilla mainly deal with linux bugs and I'm closing this ticket for now. thanks.
Comment 3 foudil.newbie+linux 2016-10-10 15:59:04 UTC
Hi, thanks for your feedback. The problem is Thomas seems unreachable: does not answer to his known email address, not found on IRC either.
Is there anyone else who could review the patch ? Rafael J. Wysocki maybe ?

Just to fully understand: you mean this bugzilla mainly deals with *kernel* bugs, not tools, right ? Because the patch applies to a file in the linux repo:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/tools/power/cpupower/utils/cpufreq-set.c?id=ac5a181d065d74fb6b213d538f743392f27bcdbd
Comment 4 foudil.newbie+linux 2016-11-21 15:28:11 UTC
Solved in c25badc, see https://bugzilla.redhat.com/show_bug.cgi?id=1374212.

Note You need to log in before you can comment on or make changes to this bug.