All of lore.kernel.org
 help / color / mirror / Atom feed
* Tiny cpupower fixes for linux-next
@ 2011-12-16 14:35 Thomas Renninger
  2011-12-16 14:35 ` [PATCH 1/4] cpupower: Add cpupower-idle-info manpage Thomas Renninger
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Thomas Renninger @ 2011-12-16 14:35 UTC (permalink / raw)
  To: linux; +Cc: cpufreq

Hi Dominik,

would be great if you could queue these up in your tree.

Thanks,

   Thomas


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/4] cpupower: Add cpupower-idle-info manpage
  2011-12-16 14:35 Tiny cpupower fixes for linux-next Thomas Renninger
@ 2011-12-16 14:35   ` Thomas Renninger
  2011-12-16 14:35   ` Thomas Renninger
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Thomas Renninger @ 2011-12-16 14:35 UTC (permalink / raw)
  To: linux
  Cc: cpufreq, Thomas Renninger, linux-arm-kernel, jean.pihet,
	linux-omap, linux-pm, linux-acpi

The last missing manpage for cpupower tools.

More info about other architecture's sleep state specialities would be great.

Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: linux-arm-kernel@lists.infradead.org
CC: jean.pihet@newoldbits.com
CC: linux-omap@vger.kernel.org
CC: linux-pm@lists.linux-foundation.org
CC: linux-acpi@vger.kernel.org
CC: cpufreq@vger.kernel.org
CC: linux@dominikbrodowski.net
---
 tools/power/cpupower/man/cpupower-idle-info.1 |   90 +++++++++++++++++++++++++
 1 files changed, 90 insertions(+), 0 deletions(-)
 create mode 100644 tools/power/cpupower/man/cpupower-idle-info.1

diff --git a/tools/power/cpupower/man/cpupower-idle-info.1 b/tools/power/cpupower/man/cpupower-idle-info.1
new file mode 100644
index 0000000..4178eff
--- /dev/null
+++ b/tools/power/cpupower/man/cpupower-idle-info.1
@@ -0,0 +1,90 @@
+.TH "CPUPOWER-IDLE-INFO" "1" "0.1" "" "cpupower Manual"
+.SH "NAME"
+.LP
+cpupower idle\-info \- Utility to retrieve cpu idle kernel information
+.SH "SYNTAX"
+.LP
+cpupower [ \-c cpulist ] idle\-info [\fIoptions\fP]
+.SH "DESCRIPTION"
+.LP
+A tool which prints out per cpu idle information helpful to developers and interested users.
+.SH "OPTIONS"
+.LP
+.TP
+\fB\-f\fR \fB\-\-silent\fR
+Only print a summary of all available C-states in the system.
+.TP
+\fB\-e\fR \fB\-\-proc\fR
+deprecated.
+Prints out idle information in old /proc/acpi/processor/*/power format. This
+interface has been removed from the kernel for quite some time, do not let
+further code depend on this option, best do not use it.
+
+.SH IDLE\-INFO DESCRIPTIONS
+CPU sleep state statistics and descriptions are retrieved from sysfs files,
+exported by the cpuidle kernel subsystem. The kernel only updates these
+statistics when it enters or leaves an idle state, therefore on a very idle or
+a very busy system, these statistics may not be accurate. They still provide a
+good overview about the usage and availability of processor sleep states on
+the platform.
+
+Be aware that the sleep states as exported by the hardware or BIOS and used by
+the Linux kernel may not exactly reflect the capabilities of the
+processor. This often is the case on the X86 architecture when the acpi_idle
+driver is used. It is also possible that the hardware overrules the kernel
+requests, due to internal activity monitors or other reasons.
+On recent X86 platforms it is often possible to read out hardware registers
+which monitor the duration of sleep states the processor resided in. The
+cpupower monitor tool (cpupower\-monitor(1)) can be used to show real sleep
+state residencies. Please refer to the architecture specific description
+section below.
+
+.SH IDLE\-INFO ARCHITECTURE SPECIFIC DESCRIPTIONS
+.SS "X86"
+POLL idle state
+
+If cpuidle is active, X86 platforms have one special idle state.
+The POLL idle state is not a real idle state, it does not save any
+power. Instead, a busy\-loop is executed doing nothing for a short period of
+time. This state is used if the kernel knows that work has to be processed
+very soon and entering any real hardware idle state may result in a slight
+performance penalty.
+
+There exist two different cpuidle drivers on the X86 architecture platform:
+
+"acpi_idle" cpuidle driver
+
+The acpi_idle cpuidle driver retrieves available sleep states (C\-states) from
+the ACPI BIOS tables (from the _CST ACPI function on recent platforms or from
+the FADT BIOS table on older ones).
+The C1 state is not retrieved from ACPI tables. If the C1 state is entered,
+the kernel will call the hlt instruction (or mwait on Intel).
+
+"intel_idle" cpuidle driver
+
+In kernel 2.6.36 the intel_idle driver was introduced.
+It only serves recent Intel CPUs (Nehalem, Westmere, Sandybridge, Atoms or
+newer). On older Intel CPUs the acpi_idle driver is still used (if the BIOS
+provides C\-state ACPI tables).
+The intel_idle driver knows the sleep state capabilities of the processor and
+ignores ACPI BIOS exported processor sleep states tables.
+
+.SH "REMARKS"
+.LP
+By default only values of core zero are displayed. How to display settings of
+other cores is described in the cpupower(1) manpage in the \-\-cpu option
+section.
+.SH REFERENCES
+http://www.acpi.info/spec.htm
+.SH "FILES"
+.nf
+\fI/sys/devices/system/cpu/cpu*/cpuidle/state*\fP
+\fI/sys/devices/system/cpu/cpuidle/*\fP
+.fi
+.SH "AUTHORS"
+.nf
+Thomas Renninger <trenn@suse.de>
+.fi
+.SH "SEE ALSO"
+.LP
+cpupower(1), cpupower\-monitor(1), cpupower\-info(1), cpupower\-set(1)
-- 
1.7.6.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 1/4] cpupower: Add cpupower-idle-info manpage
  2011-12-16 14:35 Tiny cpupower fixes for linux-next Thomas Renninger
@ 2011-12-16 14:35 ` Thomas Renninger
  2011-12-16 14:35   ` Thomas Renninger
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Thomas Renninger @ 2011-12-16 14:35 UTC (permalink / raw)
  To: linux; +Cc: cpufreq, linux-acpi, linux-pm, linux-omap, linux-arm-kernel

The last missing manpage for cpupower tools.

More info about other architecture's sleep state specialities would be great.

Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: linux-arm-kernel@lists.infradead.org
CC: jean.pihet@newoldbits.com
CC: linux-omap@vger.kernel.org
CC: linux-pm@lists.linux-foundation.org
CC: linux-acpi@vger.kernel.org
CC: cpufreq@vger.kernel.org
CC: linux@dominikbrodowski.net
---
 tools/power/cpupower/man/cpupower-idle-info.1 |   90 +++++++++++++++++++++++++
 1 files changed, 90 insertions(+), 0 deletions(-)
 create mode 100644 tools/power/cpupower/man/cpupower-idle-info.1

diff --git a/tools/power/cpupower/man/cpupower-idle-info.1 b/tools/power/cpupower/man/cpupower-idle-info.1
new file mode 100644
index 0000000..4178eff
--- /dev/null
+++ b/tools/power/cpupower/man/cpupower-idle-info.1
@@ -0,0 +1,90 @@
+.TH "CPUPOWER-IDLE-INFO" "1" "0.1" "" "cpupower Manual"
+.SH "NAME"
+.LP
+cpupower idle\-info \- Utility to retrieve cpu idle kernel information
+.SH "SYNTAX"
+.LP
+cpupower [ \-c cpulist ] idle\-info [\fIoptions\fP]
+.SH "DESCRIPTION"
+.LP
+A tool which prints out per cpu idle information helpful to developers and interested users.
+.SH "OPTIONS"
+.LP
+.TP
+\fB\-f\fR \fB\-\-silent\fR
+Only print a summary of all available C-states in the system.
+.TP
+\fB\-e\fR \fB\-\-proc\fR
+deprecated.
+Prints out idle information in old /proc/acpi/processor/*/power format. This
+interface has been removed from the kernel for quite some time, do not let
+further code depend on this option, best do not use it.
+
+.SH IDLE\-INFO DESCRIPTIONS
+CPU sleep state statistics and descriptions are retrieved from sysfs files,
+exported by the cpuidle kernel subsystem. The kernel only updates these
+statistics when it enters or leaves an idle state, therefore on a very idle or
+a very busy system, these statistics may not be accurate. They still provide a
+good overview about the usage and availability of processor sleep states on
+the platform.
+
+Be aware that the sleep states as exported by the hardware or BIOS and used by
+the Linux kernel may not exactly reflect the capabilities of the
+processor. This often is the case on the X86 architecture when the acpi_idle
+driver is used. It is also possible that the hardware overrules the kernel
+requests, due to internal activity monitors or other reasons.
+On recent X86 platforms it is often possible to read out hardware registers
+which monitor the duration of sleep states the processor resided in. The
+cpupower monitor tool (cpupower\-monitor(1)) can be used to show real sleep
+state residencies. Please refer to the architecture specific description
+section below.
+
+.SH IDLE\-INFO ARCHITECTURE SPECIFIC DESCRIPTIONS
+.SS "X86"
+POLL idle state
+
+If cpuidle is active, X86 platforms have one special idle state.
+The POLL idle state is not a real idle state, it does not save any
+power. Instead, a busy\-loop is executed doing nothing for a short period of
+time. This state is used if the kernel knows that work has to be processed
+very soon and entering any real hardware idle state may result in a slight
+performance penalty.
+
+There exist two different cpuidle drivers on the X86 architecture platform:
+
+"acpi_idle" cpuidle driver
+
+The acpi_idle cpuidle driver retrieves available sleep states (C\-states) from
+the ACPI BIOS tables (from the _CST ACPI function on recent platforms or from
+the FADT BIOS table on older ones).
+The C1 state is not retrieved from ACPI tables. If the C1 state is entered,
+the kernel will call the hlt instruction (or mwait on Intel).
+
+"intel_idle" cpuidle driver
+
+In kernel 2.6.36 the intel_idle driver was introduced.
+It only serves recent Intel CPUs (Nehalem, Westmere, Sandybridge, Atoms or
+newer). On older Intel CPUs the acpi_idle driver is still used (if the BIOS
+provides C\-state ACPI tables).
+The intel_idle driver knows the sleep state capabilities of the processor and
+ignores ACPI BIOS exported processor sleep states tables.
+
+.SH "REMARKS"
+.LP
+By default only values of core zero are displayed. How to display settings of
+other cores is described in the cpupower(1) manpage in the \-\-cpu option
+section.
+.SH REFERENCES
+http://www.acpi.info/spec.htm
+.SH "FILES"
+.nf
+\fI/sys/devices/system/cpu/cpu*/cpuidle/state*\fP
+\fI/sys/devices/system/cpu/cpuidle/*\fP
+.fi
+.SH "AUTHORS"
+.nf
+Thomas Renninger <trenn@suse.de>
+.fi
+.SH "SEE ALSO"
+.LP
+cpupower(1), cpupower\-monitor(1), cpupower\-info(1), cpupower\-set(1)
-- 
1.7.6.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 1/4] cpupower: Add cpupower-idle-info manpage
@ 2011-12-16 14:35   ` Thomas Renninger
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Renninger @ 2011-12-16 14:35 UTC (permalink / raw)
  To: linux-arm-kernel

The last missing manpage for cpupower tools.

More info about other architecture's sleep state specialities would be great.

Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: linux-arm-kernel at lists.infradead.org
CC: jean.pihet at newoldbits.com
CC: linux-omap at vger.kernel.org
CC: linux-pm at lists.linux-foundation.org
CC: linux-acpi at vger.kernel.org
CC: cpufreq at vger.kernel.org
CC: linux at dominikbrodowski.net
---
 tools/power/cpupower/man/cpupower-idle-info.1 |   90 +++++++++++++++++++++++++
 1 files changed, 90 insertions(+), 0 deletions(-)
 create mode 100644 tools/power/cpupower/man/cpupower-idle-info.1

diff --git a/tools/power/cpupower/man/cpupower-idle-info.1 b/tools/power/cpupower/man/cpupower-idle-info.1
new file mode 100644
index 0000000..4178eff
--- /dev/null
+++ b/tools/power/cpupower/man/cpupower-idle-info.1
@@ -0,0 +1,90 @@
+.TH "CPUPOWER-IDLE-INFO" "1" "0.1" "" "cpupower Manual"
+.SH "NAME"
+.LP
+cpupower idle\-info \- Utility to retrieve cpu idle kernel information
+.SH "SYNTAX"
+.LP
+cpupower [ \-c cpulist ] idle\-info [\fIoptions\fP]
+.SH "DESCRIPTION"
+.LP
+A tool which prints out per cpu idle information helpful to developers and interested users.
+.SH "OPTIONS"
+.LP
+.TP
+\fB\-f\fR \fB\-\-silent\fR
+Only print a summary of all available C-states in the system.
+.TP
+\fB\-e\fR \fB\-\-proc\fR
+deprecated.
+Prints out idle information in old /proc/acpi/processor/*/power format. This
+interface has been removed from the kernel for quite some time, do not let
+further code depend on this option, best do not use it.
+
+.SH IDLE\-INFO DESCRIPTIONS
+CPU sleep state statistics and descriptions are retrieved from sysfs files,
+exported by the cpuidle kernel subsystem. The kernel only updates these
+statistics when it enters or leaves an idle state, therefore on a very idle or
+a very busy system, these statistics may not be accurate. They still provide a
+good overview about the usage and availability of processor sleep states on
+the platform.
+
+Be aware that the sleep states as exported by the hardware or BIOS and used by
+the Linux kernel may not exactly reflect the capabilities of the
+processor. This often is the case on the X86 architecture when the acpi_idle
+driver is used. It is also possible that the hardware overrules the kernel
+requests, due to internal activity monitors or other reasons.
+On recent X86 platforms it is often possible to read out hardware registers
+which monitor the duration of sleep states the processor resided in. The
+cpupower monitor tool (cpupower\-monitor(1)) can be used to show real sleep
+state residencies. Please refer to the architecture specific description
+section below.
+
+.SH IDLE\-INFO ARCHITECTURE SPECIFIC DESCRIPTIONS
+.SS "X86"
+POLL idle state
+
+If cpuidle is active, X86 platforms have one special idle state.
+The POLL idle state is not a real idle state, it does not save any
+power. Instead, a busy\-loop is executed doing nothing for a short period of
+time. This state is used if the kernel knows that work has to be processed
+very soon and entering any real hardware idle state may result in a slight
+performance penalty.
+
+There exist two different cpuidle drivers on the X86 architecture platform:
+
+"acpi_idle" cpuidle driver
+
+The acpi_idle cpuidle driver retrieves available sleep states (C\-states) from
+the ACPI BIOS tables (from the _CST ACPI function on recent platforms or from
+the FADT BIOS table on older ones).
+The C1 state is not retrieved from ACPI tables. If the C1 state is entered,
+the kernel will call the hlt instruction (or mwait on Intel).
+
+"intel_idle" cpuidle driver
+
+In kernel 2.6.36 the intel_idle driver was introduced.
+It only serves recent Intel CPUs (Nehalem, Westmere, Sandybridge, Atoms or
+newer). On older Intel CPUs the acpi_idle driver is still used (if the BIOS
+provides C\-state ACPI tables).
+The intel_idle driver knows the sleep state capabilities of the processor and
+ignores ACPI BIOS exported processor sleep states tables.
+
+.SH "REMARKS"
+.LP
+By default only values of core zero are displayed. How to display settings of
+other cores is described in the cpupower(1) manpage in the \-\-cpu option
+section.
+.SH REFERENCES
+http://www.acpi.info/spec.htm
+.SH "FILES"
+.nf
+\fI/sys/devices/system/cpu/cpu*/cpuidle/state*\fP
+\fI/sys/devices/system/cpu/cpuidle/*\fP
+.fi
+.SH "AUTHORS"
+.nf
+Thomas Renninger <trenn@suse.de>
+.fi
+.SH "SEE ALSO"
+.LP
+cpupower(1), cpupower\-monitor(1), cpupower\-info(1), cpupower\-set(1)
-- 
1.7.6.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/4] cpupower: Unify cpupower-frequency-* manpages
  2011-12-16 14:35 Tiny cpupower fixes for linux-next Thomas Renninger
  2011-12-16 14:35 ` [PATCH 1/4] cpupower: Add cpupower-idle-info manpage Thomas Renninger
  2011-12-16 14:35   ` Thomas Renninger
@ 2011-12-16 14:35 ` Thomas Renninger
  2011-12-16 14:35 ` [PATCH 3/4] cpupower: Fix number of idle states Thomas Renninger
  2011-12-16 14:35 ` [PATCH 4/4] cpupower: Remove unneeded code and by that fix a memleak Thomas Renninger
  4 siblings, 0 replies; 12+ messages in thread
From: Thomas Renninger @ 2011-12-16 14:35 UTC (permalink / raw)
  To: linux; +Cc: cpufreq, Thomas Renninger, malattia

cpupower-frequency-* manpages slightly differed from the others.
  - Use uppercase letters in the title
  - Show cpupower Manual in the header
  - Remove Mattia from left down corner of the manpage, he is already
    listed as author
  - Remove --help, prints this message -> not needed

Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: cpufreq@vger.kernel.org
CC: linux@dominikbrodowski.net
CC: malattia@linux.it
---
 tools/power/cpupower/man/cpupower-frequency-info.1 |    4 +---
 tools/power/cpupower/man/cpupower-frequency-set.1  |    4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/tools/power/cpupower/man/cpupower-frequency-info.1 b/tools/power/cpupower/man/cpupower-frequency-info.1
index bb60a8d..4a1918e 100644
--- a/tools/power/cpupower/man/cpupower-frequency-info.1
+++ b/tools/power/cpupower/man/cpupower-frequency-info.1
@@ -1,4 +1,4 @@
-.TH "cpupower-frequency-info" "1" "0.1" "Mattia Dongili" ""
+.TH "CPUPOWER\-FREQUENCY\-INFO" "1" "0.1" "" "cpupower Manual"
 .SH "NAME"
 .LP 
 cpupower frequency\-info \- Utility to retrieve cpufreq kernel information
@@ -50,8 +50,6 @@ Prints out information like provided by the /proc/cpufreq interface in 2.4. and
 \fB\-m\fR \fB\-\-human\fR
 human\-readable output for the \-f, \-w, \-s and \-y parameters.
 .TP  
-\fB\-h\fR \fB\-\-help\fR
-Prints out the help screen.
 .SH "REMARKS"
 .LP 
 By default only values of core zero are displayed. How to display settings of
diff --git a/tools/power/cpupower/man/cpupower-frequency-set.1 b/tools/power/cpupower/man/cpupower-frequency-set.1
index 685f469..3eacc8d 100644
--- a/tools/power/cpupower/man/cpupower-frequency-set.1
+++ b/tools/power/cpupower/man/cpupower-frequency-set.1
@@ -1,4 +1,4 @@
-.TH "cpupower-freqency-set" "1" "0.1" "Mattia Dongili" ""
+.TH "CPUPOWER\-FREQUENCY\-SET" "1" "0.1" "" "cpupower Manual"
 .SH "NAME"
 .LP 
 cpupower frequency\-set \- A small tool which allows to modify cpufreq settings.
@@ -26,8 +26,6 @@ specific frequency to be set. Requires userspace governor to be available and lo
 \fB\-r\fR \fB\-\-related\fR
 modify all hardware-related CPUs at the same time
 .TP 
-\fB\-h\fR \fB\-\-help\fR
-Prints out the help screen.
 .SH "REMARKS"
 .LP 
 By default values are applied on all cores. How to modify single core
-- 
1.7.6.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/4] cpupower: Fix number of idle states
  2011-12-16 14:35 Tiny cpupower fixes for linux-next Thomas Renninger
                   ` (2 preceding siblings ...)
  2011-12-16 14:35 ` [PATCH 2/4] cpupower: Unify cpupower-frequency-* manpages Thomas Renninger
@ 2011-12-16 14:35 ` Thomas Renninger
  2011-12-16 14:35 ` [PATCH 4/4] cpupower: Remove unneeded code and by that fix a memleak Thomas Renninger
  4 siblings, 0 replies; 12+ messages in thread
From: Thomas Renninger @ 2011-12-16 14:35 UTC (permalink / raw)
  To: linux; +Cc: cpufreq, Thomas Renninger

The number of idle states was wrong.
The POLL idle state (on X86) was missed out:
Number of idle states: 4
Available idle states: C1-NHM C3-NHM C6-NHM

While the POLL is not a real idle state, its
statistics should still be shown. It's now also
explained in a detailed manpage.
This should fix a bug of missing the first idle
state on other archs.

Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: cpufreq@vger.kernel.org
CC: linux@dominikbrodowski.net
---
 tools/power/cpupower/utils/cpuidle-info.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/power/cpupower/utils/cpuidle-info.c b/tools/power/cpupower/utils/cpuidle-info.c
index b028267..e076beb 100644
--- a/tools/power/cpupower/utils/cpuidle-info.c
+++ b/tools/power/cpupower/utils/cpuidle-info.c
@@ -43,9 +43,8 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbose)
 	}
 
 	printf(_("Number of idle states: %d\n"), idlestates);
-
 	printf(_("Available idle states:"));
-	for (idlestate = 1; idlestate < idlestates; idlestate++) {
+	for (idlestate = 0; idlestate < idlestates; idlestate++) {
 		tmp = sysfs_get_idlestate_name(cpu, idlestate);
 		if (!tmp)
 			continue;
@@ -57,7 +56,7 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbose)
 	if (!verbose)
 		return;
 
-	for (idlestate = 1; idlestate < idlestates; idlestate++) {
+	for (idlestate = 0; idlestate < idlestates; idlestate++) {
 		tmp = sysfs_get_idlestate_name(cpu, idlestate);
 		if (!tmp)
 			continue;
-- 
1.7.6.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/4] cpupower: Remove unneeded code and by that fix a memleak
  2011-12-16 14:35 Tiny cpupower fixes for linux-next Thomas Renninger
                   ` (3 preceding siblings ...)
  2011-12-16 14:35 ` [PATCH 3/4] cpupower: Fix number of idle states Thomas Renninger
@ 2011-12-16 14:35 ` Thomas Renninger
  4 siblings, 0 replies; 12+ messages in thread
From: Thomas Renninger @ 2011-12-16 14:35 UTC (permalink / raw)
  To: linux; +Cc: cpufreq, Thomas Renninger

Looks like some not needed debug code slipped in.
Also this code:
tmp = sysfs_get_idlestate_name(cpu, idlestates - 1);
performs a strdup and the mem was not freed again.
-> delete it.

Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: cpufreq@vger.kernel.org
CC: linux@dominikbrodowski.net
---
 tools/power/cpupower/utils/cpuidle-info.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/tools/power/cpupower/utils/cpuidle-info.c b/tools/power/cpupower/utils/cpuidle-info.c
index e076beb..8145af5 100644
--- a/tools/power/cpupower/utils/cpuidle-info.c
+++ b/tools/power/cpupower/utils/cpuidle-info.c
@@ -35,13 +35,6 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbose)
 		printf(_("CPU %u: Can't read idle state info\n"), cpu);
 		return;
 	}
-	tmp = sysfs_get_idlestate_name(cpu, idlestates - 1);
-	if (!tmp) {
-		printf(_("Could not determine max idle state %u\n"),
-		       idlestates - 1);
-		return;
-	}
-
 	printf(_("Number of idle states: %d\n"), idlestates);
 	printf(_("Available idle states:"));
 	for (idlestate = 0; idlestate < idlestates; idlestate++) {
-- 
1.7.6.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] cpupower: Add cpupower-idle-info manpage
  2011-12-16 14:35   ` Thomas Renninger
@ 2011-12-16 16:18     ` Jean Pihet
  -1 siblings, 0 replies; 12+ messages in thread
From: Jean Pihet @ 2011-12-16 16:18 UTC (permalink / raw)
  To: Thomas Renninger
  Cc: linux, cpufreq, linux-arm-kernel, linux-omap, linux-pm, linux-acpi

Hi Thomas,

On Fri, Dec 16, 2011 at 3:35 PM, Thomas Renninger <trenn@suse.de> wrote:
> The last missing manpage for cpupower tools.
Great!

> More info about other architecture's sleep state specialities would be great.
I wonder if it is the right place for some arch specific information
about the sleep states.

I propose to document this in a more generic doc file (e.g.
Documentation/arm/OMAP/omap_pm) and link it from the manpage.

What do you think?

>
> Signed-off-by: Thomas Renninger <trenn@suse.de>
> CC: linux-arm-kernel@lists.infradead.org
> CC: jean.pihet@newoldbits.com
> CC: linux-omap@vger.kernel.org
> CC: linux-pm@lists.linux-foundation.org
> CC: linux-acpi@vger.kernel.org
> CC: cpufreq@vger.kernel.org
> CC: linux@dominikbrodowski.net

Regards,
Jean

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] cpupower: Add cpupower-idle-info manpage
  2011-12-16 14:35   ` Thomas Renninger
  (?)
  (?)
@ 2011-12-16 16:18   ` Jean Pihet
  -1 siblings, 0 replies; 12+ messages in thread
From: Jean Pihet @ 2011-12-16 16:18 UTC (permalink / raw)
  To: Thomas Renninger
  Cc: cpufreq, linux-acpi, linux, linux-pm, linux-omap, linux-arm-kernel

Hi Thomas,

On Fri, Dec 16, 2011 at 3:35 PM, Thomas Renninger <trenn@suse.de> wrote:
> The last missing manpage for cpupower tools.
Great!

> More info about other architecture's sleep state specialities would be great.
I wonder if it is the right place for some arch specific information
about the sleep states.

I propose to document this in a more generic doc file (e.g.
Documentation/arm/OMAP/omap_pm) and link it from the manpage.

What do you think?

>
> Signed-off-by: Thomas Renninger <trenn@suse.de>
> CC: linux-arm-kernel@lists.infradead.org
> CC: jean.pihet@newoldbits.com
> CC: linux-omap@vger.kernel.org
> CC: linux-pm@lists.linux-foundation.org
> CC: linux-acpi@vger.kernel.org
> CC: cpufreq@vger.kernel.org
> CC: linux@dominikbrodowski.net

Regards,
Jean

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/4] cpupower: Add cpupower-idle-info manpage
@ 2011-12-16 16:18     ` Jean Pihet
  0 siblings, 0 replies; 12+ messages in thread
From: Jean Pihet @ 2011-12-16 16:18 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Thomas,

On Fri, Dec 16, 2011 at 3:35 PM, Thomas Renninger <trenn@suse.de> wrote:
> The last missing manpage for cpupower tools.
Great!

> More info about other architecture's sleep state specialities would be great.
I wonder if it is the right place for some arch specific information
about the sleep states.

I propose to document this in a more generic doc file (e.g.
Documentation/arm/OMAP/omap_pm) and link it from the manpage.

What do you think?

>
> Signed-off-by: Thomas Renninger <trenn@suse.de>
> CC: linux-arm-kernel at lists.infradead.org
> CC: jean.pihet at newoldbits.com
> CC: linux-omap at vger.kernel.org
> CC: linux-pm at lists.linux-foundation.org
> CC: linux-acpi at vger.kernel.org
> CC: cpufreq at vger.kernel.org
> CC: linux at dominikbrodowski.net

Regards,
Jean

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] cpupower: Add cpupower-idle-info manpage
  2011-12-16 16:18     ` Jean Pihet
@ 2011-12-17  9:21       ` Thomas Renninger
  -1 siblings, 0 replies; 12+ messages in thread
From: Thomas Renninger @ 2011-12-17  9:21 UTC (permalink / raw)
  To: Jean Pihet
  Cc: cpufreq, linux-acpi, linux, linux-pm, linux-omap, linux-arm-kernel

On Friday 16 December 2011 17:18:37 Jean Pihet wrote:
> Hi Thomas,
> 
> On Fri, Dec 16, 2011 at 3:35 PM, Thomas Renninger <trenn@suse.de> wrote:
> > The last missing manpage for cpupower tools.
> Great!
> 
> > More info about other architecture's sleep state specialities would be great.
> I wonder if it is the right place for some arch specific information
> about the sleep states.
> 
> I propose to document this in a more generic doc file (e.g.
> Documentation/arm/OMAP/omap_pm) and link it from the manpage.
Duplicating info at different places increases needed maintenance.
Mabye above should be more about the kernel implementation details
and the manpage should more include the bits a typical user
wants to know?

> What do you think?
The POLL state is a bit confusing on X86 cpupower idle-info output.
Also on X86 the CPU may decide to use other states than the kernel
requested and the cpupower monitor tool should get used to see them.
This directly affects the output/usage of the tool and to understand it,
it should be documented in the manpage.

IMO it's not bad to have a somewhat bigger manpage here.
Especially on ARM, also the "ordinary" user wants to know
about how/whether the cpu power functionalities work as expected
without the need of looking at the kernel sources.

For now I could only try out cpupower on an ARM platform
with cpufreq support.
Would be great if someone could give cpupower idle-info
a try on such a machine.
Think of a typical user, not a kernel hacker and what he needs to
know to interpret and understand the output.
Maybe it's self-explanatory already, maybe the one or other arch
specific bit should get explained?

   Thomas

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/4] cpupower: Add cpupower-idle-info manpage
@ 2011-12-17  9:21       ` Thomas Renninger
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Renninger @ 2011-12-17  9:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 16 December 2011 17:18:37 Jean Pihet wrote:
> Hi Thomas,
> 
> On Fri, Dec 16, 2011 at 3:35 PM, Thomas Renninger <trenn@suse.de> wrote:
> > The last missing manpage for cpupower tools.
> Great!
> 
> > More info about other architecture's sleep state specialities would be great.
> I wonder if it is the right place for some arch specific information
> about the sleep states.
> 
> I propose to document this in a more generic doc file (e.g.
> Documentation/arm/OMAP/omap_pm) and link it from the manpage.
Duplicating info at different places increases needed maintenance.
Mabye above should be more about the kernel implementation details
and the manpage should more include the bits a typical user
wants to know?

> What do you think?
The POLL state is a bit confusing on X86 cpupower idle-info output.
Also on X86 the CPU may decide to use other states than the kernel
requested and the cpupower monitor tool should get used to see them.
This directly affects the output/usage of the tool and to understand it,
it should be documented in the manpage.

IMO it's not bad to have a somewhat bigger manpage here.
Especially on ARM, also the "ordinary" user wants to know
about how/whether the cpu power functionalities work as expected
without the need of looking at the kernel sources.

For now I could only try out cpupower on an ARM platform
with cpufreq support.
Would be great if someone could give cpupower idle-info
a try on such a machine.
Think of a typical user, not a kernel hacker and what he needs to
know to interpret and understand the output.
Maybe it's self-explanatory already, maybe the one or other arch
specific bit should get explained?

   Thomas

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-12-17  9:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-16 14:35 Tiny cpupower fixes for linux-next Thomas Renninger
2011-12-16 14:35 ` [PATCH 1/4] cpupower: Add cpupower-idle-info manpage Thomas Renninger
2011-12-16 14:35 ` Thomas Renninger
2011-12-16 14:35   ` Thomas Renninger
2011-12-16 16:18   ` Jean Pihet
2011-12-16 16:18     ` Jean Pihet
2011-12-17  9:21     ` Thomas Renninger
2011-12-17  9:21       ` Thomas Renninger
2011-12-16 16:18   ` Jean Pihet
2011-12-16 14:35 ` [PATCH 2/4] cpupower: Unify cpupower-frequency-* manpages Thomas Renninger
2011-12-16 14:35 ` [PATCH 3/4] cpupower: Fix number of idle states Thomas Renninger
2011-12-16 14:35 ` [PATCH 4/4] cpupower: Remove unneeded code and by that fix a memleak Thomas Renninger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.