Bug 135391
Summary: | cpupower does not change the governor anymore | ||
---|---|---|---|
Product: | Tools | Reporter: | Jose (jjorge) |
Component: | Other | Assignee: | Tools.Other (tools_other) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | bkohler, eatdirt, floppym, foudil.newbie+linux, hhielscher, icanrealizeum+bugzillakernelorg, jjorge, malattia, szg00000, trenn |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.7-rc7 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | this is what I ended up using as a fix(for me) |
Description
Jose
2016-07-16 14:16:54 UTC
I see the same behavior here. I did a bisect and this commit appears to be the culprit: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/tools/power/cpupower?id=ac5a181d065d74fb6b213d538f743392f27bcdbd So here's the thing: invocations of cpufreq_cpu_exists got replaced by cpupower_is_cpu_online but the logic is different! ----old version: returns 0 if the specified CPU is present (it doesn't say - * whether it is online!), and an error value if not. - */ - -extern int cpufreq_cpu_exists(unsigned int cpu); ----new version: * Detect whether a CPU is online + * + * Returns: + * 1 -> if CPU is online + * 0 -> if CPU is offline + * negative errno values in error case + */ +int cpupower_is_cpu_online(unsigned int cpu) +{ source: https://github.com/torvalds/linux/commit/ac5a181d065d74fb6b213d538f743392f27bcdbd Now, I can confirm this works for me: two cases needed a not (aka "!"): this https://github.com/torvalds/linux/commit/ac5a181d065d74fb6b213d538f743392f27bcdbd#diff-0d2591a0e5c1bea4b5b35758e0726657R299 and https://github.com/torvalds/linux/commit/ac5a181d065d74fb6b213d538f743392f27bcdbd#diff-0d2591a0e5c1bea4b5b35758e0726657R319 There's probably more cases, but I only needed the gov and freq set. And I haven't tested anything else for now. tested kernel: 4.8.0-rc1-g9512c47 Cheers my friends! Created attachment 228271 [details]
this is what I ended up using as a fix(for me)
works for me.
-------before:
$ cpunorm
modprobe: FATAL: Module msr not found in directory /lib/modules/4.8.0-rc1-g9512c47
current policy: frequency should be within 1.40 GHz and 1.40 GHz.
The governor "performance" may decide which speed to use
current CPU frequency: Unable to call hardware
current CPU frequency: 1.40 GHz (asserted by call to kernel)
-------after:
//[2016-08-11 03:00] [ALPM] upgraded cpupower (4.7-1 -> 4.8.rc1.r70.g9512c47-1)
$ cpunorm
modprobe: FATAL: Module msr not found in directory /lib/modules/4.8.0-rc1-g9512c47
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
current policy: frequency should be within 800 MHz and 1.40 GHz.
The governor "ondemand" may decide which speed to use
current CPU frequency: Unable to call hardware
current CPU frequency: 1.40 GHz (asserted by call to kernel)
Well, can someone apply this patch upstream if it fixes the bug? Thanks. Yes, that would be nice guys, still not fixed on 4.8.1, which is annoying for computing servers based on intel_pstates which default on powersave. Ping? still not fixed on 4.8.3... Added Thomas to the CC list. I don't know how to edit the fields at the top, but this bug needs the attention of the right developers. This has been fixed recently in commit c25badc, which will pop up in v4.9 I think. See also: https://bugzilla.kernel.org/show_bug.cgi?id=153221 So I guess this bug can be closed. Yes, confirmed |