Provide cpupower-idle-set(1) manpage and a minor fix
Rafael: Could you queue these two again in your tree if they are ok, please.
Sidenote:
If I find the time, I like to adjust the cpuidle ladder governor:
If a lighter sleep state is disabled (and in this governor deeper sleep states are not entered any more as well), I like to set the disabled flag for the deeper sleep states as well.
Like that the correct kernel behavior (the disabled and all deeper sleep states are not used anymore) is shown correctly to userspace and this is not only documented deep inside the kernel sources.
Thanks,
Thomas
PATCH 1/2 tools cpupower: Add cpupower-idle-set(1) manpage
cpupower idle-set subcommand was introduce recently. This patch provides the missing manpage.
If cpupower is properly installed it will show up automatically (similar to git), when invoking:
cpupower help idle-set
or
cpupower idle-set --help
Some parts have been taken over and adjusted from
git commit 62d6ae880e3e76098
documentation submitted by Carsten Emde.
--- tools/power/cpupower/man/cpupower-idle-info.1 | 3 +- tools/power/cpupower/man/cpupower-idle-set.1 | 71 +++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletions(-) create mode 100644 tools/power/cpupower/man/cpupower-idle-set.1
tools/power/cpupower/man/cpupower-idle-info.1 +2 -1
@@ -87,4 +87,5 @@ Thomas Renninger <[email protected]> .fi .SH "SEE ALSO" .LP -cpupower(1), cpupower\-monitor(1), cpupower\-info(1), cpupower\-set(1) +cpupower(1), cpupower\-monitor(1), cpupower\-info(1), cpupower\-set(1), +cpupower\-idle\-set(1)
tools/power/cpupower/man/cpupower-idle-set.1 new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
1.7.6.1
PATCH 2/2 tools cpupower: fix wrong err msg not supported vs not available
In reply to Thomas Renningeridlestates in sysfs are counted from 0.
This fixes a wrong error message.
Current behavior on a machine with 4 sleep states is:
cpupower idle-set -e 4
Idlestate 4 enabled on CPU 0
-----Wrong---------------------
cpupower idle-set -e 5
Idlestate enabling not supported by kernel
-----Must and now will be -----
cpupower idle-set -e 5
Idlestate 6 not available on CPU 0
-------------------------------
cpupower idle-set -e 6
Idlestate 6 not available on CPU 0
--- tools/power/cpupower/utils/helpers/sysfs.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
tools/power/cpupower/utils/helpers/sysfs.c +2 -2
@@ -278,7 +278,7 @@ static char *sysfs_idlestate_get_one_string(unsigned int cpu, int sysfs_is_idlestate_disabled(unsigned int cpu, unsigned int idlestate) { - if (sysfs_get_idlestate_count(cpu) < idlestate) + if (sysfs_get_idlestate_count(cpu) <= idlestate) return -1; if (!sysfs_idlestate_file_exists(cpu, idlestate,
@@ -303,7 +303,7 @@ int sysfs_idlestate_disable(unsigned int cpu,char value[SYSFS_PATH_MAX ];int bytes_written; -if (sysfs_get_idlestate_count (cpu) < idlestate) +if (sysfs_get_idlestate_count (cpu) <= idlestate)return -1 ; if (!sysfs_idlestate_file_exists(cpu, idlestate,
Signature · 1 line
1.7.6.1