Skip to contentSkip to conversation

New: failing to set governor with cpupower-frequency-set

Bug 153221 [email protected] 1 participant 2 messages Aug 16, 2016 – Aug 25, 2016

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=153221

            Bug ID: 153221
           Summary: failing to set governor with cpupower-frequency-set
           Product: Power Management
           Version: 2.5
    Kernel Version: 4.7.0-1-ARCH
          Hardware: Intel
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: cpufreq
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

Created attachment 229121
--> https://bugzilla.kernel.org/attachment.cgi?id=229121&action=edit
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.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.