Bug 735685 - cpupower script (from kernel-tools) is completely broken/incomplete/unusable in F16/rawhide
Summary: cpupower script (from kernel-tools) is completely broken/incomplete/unusable ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 15
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-04 23:19 UTC by Artem S. Tashkinov
Modified: 2011-09-07 17:08 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-07 17:08:17 UTC


Attachments (Terms of Use)
Patches for cpupower.service and cpupower settings in sysconfig (1004 bytes, patch)
2011-09-04 23:49 UTC, Artem S. Tashkinov
no flags Details | Diff

Description Artem S. Tashkinov 2011-09-04 23:19:49 UTC
cpupower (power savings) doesn't work at all after upgrading F15 to F16.

I've encountered the following problems, which need to be fixed ASAP:

1) /etc/sysconfig/cpupower is *broken*:

it has:

CPUPOWER_START_OPTS="frequency-set -g performance"
CPUPOWER_STOP_OPTS="frequency-set -g ondemand"

obviously "performance" and "ondemand" must be swapped in order to work

2) cpupower will never start by default because

* CPU specific modules are not loaded on boot by default (like powernow-k8)
* cpufreq_* governor modules are also not loaded on boot by default

Comment 1 Artem S. Tashkinov 2011-09-04 23:26:00 UTC
Thus,

1)

/etc/sysconfig/cpupower

must contain a CPU specific module to be loaded, e.g.

CPUDRIVER=acpi-cpufreq

and 

2)

/lib/systemd/system/cpupower.service

must automatically load cpufreq_* modules (preferably all three of them, since they are tiny and could be read from a disk instantly:

-rwxr--r-- 1 root root 14248 Aug 16 10:23 cpufreq_conservative.ko
-rwxr--r-- 1 root root 16080 Aug 16 10:23 cpufreq_ondemand.ko
-rwxr--r-- 1 root root  4808 Aug 16 10:24 cpufreq_powersave.ko
)

Comment 2 Artem S. Tashkinov 2011-09-04 23:49:56 UTC
Created attachment 521409 [details]
Patches for cpupower.service and cpupower settings in sysconfig

Please, apply.

Comment 3 Josh Boyer 2011-09-06 15:24:32 UTC
Petr, we inherited these settings from the cpupowerutils package in f16/rawhide.  Do Artem's changes look correct to you?

Comment 4 Petr Šabata 2011-09-07 07:00:07 UTC
It depends.  I'd say no because:

1) 'ondemand' was supposed to be the default governor in F16; starting the service was meant to override this ('performance' there is just an example)

2) All those modules were supposed to be built-in in F16.

cpupower.service was not planned to be run by default on most systems; it's only for users who don't like 'ondemand' or wish to tweak their system a bit.

Comment 5 Petr Šabata 2011-09-07 07:06:03 UTC
See the bug 713572.

I don't have a F16 system, so this is just a theory though.

Comment 6 Artem S. Tashkinov 2011-09-07 07:34:15 UTC
(In reply to comment #4)

1) Making it the default in kernel won't work, if a CPU driver is not specified and loaded (and judging from F16 alphas, CPU specific frequency modules are not loaded on boot)

2) And they aren't

So either you change .config and make all those modules built-in or this bug is still valid :)

Comment 7 Josh Boyer 2011-09-07 11:45:02 UTC
(In reply to comment #6)
> (In reply to comment #4)
> 
> 1) Making it the default in kernel won't work, if a CPU driver is not specified
> and loaded (and judging from F16 alphas, CPU specific frequency modules are not
> loaded on boot)
> 
> 2) And they aren't

They are built in:

[jwboyer@localhost ~]$ grep GOV /boot/config-3.1.0-0.rc4.git0.0.fc16.x86_64 
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y

> So either you change .config and make all those modules built-in or this bug is
> still valid :)

Given all the information now, I'm not sure this bug is valid.

Comment 8 Petr Šabata 2011-09-07 11:55:28 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #4)
> > 
> > 1) Making it the default in kernel won't work, if a CPU driver is not specified
> > and loaded (and judging from F16 alphas, CPU specific frequency modules are not
> > loaded on boot)
> > 
> > 2) And they aren't
> 
> They are built in:
> 
> [jwboyer@localhost ~]$ grep GOV /boot/config-3.1.0-0.rc4.git0.0.fc16.x86_64 
> # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
> # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
> CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
> # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
> CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
> CONFIG_CPU_FREQ_GOV_POWERSAVE=y
> CONFIG_CPU_FREQ_GOV_USERSPACE=y
> CONFIG_CPU_FREQ_GOV_ONDEMAND=y
> CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
> CONFIG_CPU_IDLE_GOV_LADDER=y
> CONFIG_CPU_IDLE_GOV_MENU=y
> 

Um, Artem was talking about acpi-cpufreq, pcc-cpufreq and such, I believe.
Those, too, should be built-in.

Comment 9 Josh Boyer 2011-09-07 13:12:04 UTC
They are, yes:

[jwboyer@localhost ~]$ grep CPUFREQ /boot/config-3.1.0-0.rc4.git0.0.fc16.x86_64 
CONFIG_X86_PCC_CPUFREQ=y
CONFIG_X86_ACPI_CPUFREQ=y
[jwboyer@localhost ~]$

Comment 10 Artem S. Tashkinov 2011-09-07 17:08:17 UTC
(In reply to comment #9)

You are right, the kernel configuration in F16 has changed, and all the mentioned modules are built-in now.


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