Bug 153221
Summary: | failing to set governor with cpupower-frequency-set | ||
---|---|---|---|
Product: | Power Management | Reporter: | foudil.newbie+linux |
Component: | cpufreq | Assignee: | Thomas Renninger (trenn) |
Status: | CLOSED INVALID | ||
Severity: | normal | CC: | yu.c.chen |
Priority: | P1 | ||
Hardware: | Intel | ||
OS: | Linux | ||
Kernel Version: | 4.7.0-1-ARCH | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | cpupower-frequency-set patch |
@Thomas, would you please help take a look? thanks. foudil, please send the patch to Thomas, and this bugzilla mainly deal with linux bugs and I'm closing this ticket for now. thanks. 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 Solved in c25badc, see https://bugzilla.redhat.com/show_bug.cgi?id=1374212. |
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.