Skip to contentSkip to conversation

cpupower: fix various man pages issues

PATCH Applied Roberto Ricci 2 participants 9 messages Mar 24 – Mar 25 CPU power monitoring

lore
Share & tools
lore
#0 lore raw

v5 cover cpupower: fix various man pages issues

This patch series fixes a few issues with the cpupower manual pages, such as missing or incorrect options and trailing whitespace.

---
Changes in v5:
- Drop whitespace removal patches
Link to v4: https://lore.kernel.org/linux-pm/[email protected]/

Changes in v4:
- Remove Fixes tags from commit messages
- Fix issues reported by scripts/checkpatch.pl
- Add patches to trim whitespace from some files
- Add cover letter
Link to v3: https://lore.kernel.org/linux-pm/[email protected]/

Changes in v3:
- Resend because v2 patches have been incorrectly sent as replies to individual v1 messages.
Links to v2:
- https://lore.kernel.org/linux-pm/abH7pF9p8KxAsHIE@desktop0a/
- https://lore.kernel.org/linux-pm/abH9KsKbvyi-iceb@desktop0a/
- https://lore.kernel.org/linux-pm/abH9rMVuy8wmzgkG@desktop0a/
- https://lore.kernel.org/linux-pm/abH9_Jk-ckkJvsGb@desktop0a/

Changes in v2:
- More descriptive commit messages
Links to v1:
- https://lore.kernel.org/linux-pm/abHAZj9xwfDf5JVZ@desktop0a/
- https://lore.kernel.org/linux-pm/abHAdH-ggaxUugCy@desktop0a/
- https://lore.kernel.org/linux-pm/abHAhAg-6gaK0Qn7@desktop0a/
- https://lore.kernel.org/linux-pm/abHAkgiPg8VDpDoV@desktop0a/
---

Roberto Ricci (4):
cpupower-idle-info.1: fix short option names cpupower-frequency-info.1: use the proper name of the --perf option cpupower-frequency-info.1: document --boost and --epp options cpupower-info.1: describe the --perf-bias option

 tools/power/cpupower/man/cpupower-frequency-info.1 | 8 +++++++-
 tools/power/cpupower/man/cpupower-idle-info.1      | 4 ++--
 tools/power/cpupower/man/cpupower-info.1           | 9 ++++++++-
 3 files changed, 17 insertions(+), 4 deletions(-)
Signature · 1 line
2.53.0
#1 lore raw

PATCH v5 1/4 cpupower-idle-info.1: fix short option names

The cpupower-idle-info(1) man page describes '-f' as the short form of the '--silent' option and '-e' as the short form of the '--proc' option. But they are not correct:

$ cpupower idle-info -f
idle-info: invalid option -- 'f'
invalid or unknown argument
$ cpupower idle-info -e
idle-info: invalid option -- 'e'
invalid or unknown argument

The short form of '--silent' is actually '-s' and the short form of '--proc' is actually '-o':

cpuidle-info.c:

	{"silent", no_argument, NULL, 's'},
	{"proc", no_argument, NULL, 'o'},
---
 tools/power/cpupower/man/cpupower-idle-info.1 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/power/cpupower/man/cpupower-idle-info.1 +2 -2
index 20b6345c53ad..b2f92aba5f5b 100644
@@ -11,10 +11,10 @@ A tool which prints out per cpu idle information helpful to developers and inter
 .SH "OPTIONS"
 .LP
 .TP
-\fB\-f\fR \fB\-\-silent\fR
+\fB\-s\fR \fB\-\-silent\fR
 Only print a summary of all available C-states in the system.
 .TP
-\fB\-e\fR \fB\-\-proc\fR
+\fB\-o\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
Signature · 1 line
2.53.0
#2 lore raw

PATCH v5 2/4 cpupower-frequency-info.1: use the proper name of the --perf option

In reply to Roberto Ricci

The cpupower-frequency-info(1) man page describes a '--perf' option. Even though this form is accepted by the program, its proper name is '--performance'.

cpufreq-info.c:

	{"performance", no_argument,	 NULL,	 'c'},
---
 tools/power/cpupower/man/cpupower-frequency-info.1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/power/cpupower/man/cpupower-frequency-info.1 +1 -1
index 47fdd7218748..1173d4f31e69 100644
@@ -53,7 +53,7 @@ human\-readable output for the \-f, \-w, \-s and \-y parameters.
 \fB\-n\fR \fB\-\-no-rounding\fR
 Output frequencies and latencies without rounding off values.
 .TP  
-\fB\-c\fR \fB\-\-perf\fR
+\fB\-c\fR \fB\-\-performance\fR
 Get performances and frequencies capabilities of CPPC, by reading it from hardware (only available on the hardware with CPPC).
 .TP
 .SH "REMARKS"
Signature · 1 line
2.53.0
maintainer
#3 lore raw

Re: [PATCH v5 2/4] cpupower-frequency-info.1: use the proper name of the --perf option

Quoted 17 lines · Roberto Ricci

The cpupower-frequency-info(1) man page describes a '--perf' option. Even though this form is accepted by the program, its proper name is '--performance'.

cpufreq-info.c:

	{"performance", no_argument,	 NULL,	 'c'},
---
  tools/power/cpupower/man/cpupower-frequency-info.1 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tools/power/cpupower/man/cpupower-frequency-info.1 +0 -0
index 47fdd7218748..1173d4f31e69 100644

tools/power/cpupower/man/cpupower-frequency-info.1 human\-readable output for the \-f, \-w, \-s and \-y parameters. · line 56

Quoted 5 lines
tools/power/cpupower/man/cpupower-frequency-info.1 +1 -1
@@ -53,7 +53,7 @@ human\-readable output for the \-f, \-w, \-s and \-y parameters.
  \fB\-n\fR \fB\-\-no-rounding\fR
  Output frequencies and latencies without rounding off values.
  .TP
-\fB\-c\fR \fB\-\-perf\fR
+\fB\-c\fR \fB\-\-performance\fR

I would keep perf and also add performance since --perf and --performance work - it is lot easier to type --perf

tools/power/cpupower/man/cpupower-frequency-info.1 human\-readable output for the \-f, \-w, \-s and \-y parameters. · line 59

Quoted 3 lines
tools/power/cpupower/man/cpupower-frequency-info.1 +0 -0
  Get performances and frequencies capabilities of CPPC, by reading it from hardware (only available on the hardware with CPPC).
  .TP
  .SH "REMARKS"

thanks,
-- Shuah

maintainer
#4 lore raw

Re: [PATCH v5 2/4] cpupower-frequency-info.1: use the proper name of the --perf option

Quoted 13 lines · Shuah Khan
Quoted 12 lines · Roberto Ricci

The cpupower-frequency-info(1) man page describes a '--perf' option. Even though this form is accepted by the program, its proper name is '--performance'.

cpufreq-info.c:
    {"performance", no_argument,     NULL,     'c'},

---
  tools/power/cpupower/man/cpupower-frequency-info.1 | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines
Quoted 10 lines
tools/power/cpupower/man/cpupower-frequency-info.1 +0 -0
index 47fdd7218748..1173d4f31e69 100644
@@ -53,7 +53,7 @@ human\-readable output for the \-f, \-w, \-s and \-y parameters.

  \fB\-n\fR \fB\-\-no-rounding\fR
  Output frequencies and latencies without rounding off values. .TP
-\fB\-c\fR \fB\-\-perf\fR
+\fB\-c\fR \fB\-\-performance\fR

I would keep perf and also add performance since --perf and --performance work - it is lot easier to type --perf

You can send just this one patch unless there are dependencies with others.

thanks,
-- Shuah

#5 lore raw

Re: [PATCH v5 2/4] cpupower-frequency-info.1: use the proper name of the --perf option

In reply to Shuah Khan
Quoted 5 lines · Shuah Khan
Quoted 4 lines · Roberto Ricci

The cpupower-frequency-info(1) man page describes a '--perf' option. Even though this form is accepted by the program, its proper name is '--performance'.

Quoted 14 lines

tools/power/cpupower/man/cpupower-frequency-info.1 human\-readable output for the \-f, \-w, \-s and \-y parameters. · line 56

Quoted 11 lines

cpufreq-info.c:

	{"performance", no_argument,	 NULL,	 'c'},

[...]

tools/power/cpupower/man/cpupower-frequency-info.1 +1 -1
@@ -53,7 +53,7 @@ human\-readable output for the \-f, \-w, \-s and \-y parameters.
  \fB\-n\fR \fB\-\-no-rounding\fR
  Output frequencies and latencies without rounding off values.
  .TP
-\fB\-c\fR \fB\-\-perf\fR
+\fB\-c\fR \fB\-\-performance\fR

I would keep perf and also add performance since --perf and --performance work - it is lot easier to type --perf

--perf would still be accepted by the program, whether or not the man page mentions it. getopt_long() accepts any abbreviation which is not ambiguous. While I agree that it would be nice to remind users about abbreviations, why should the man page suggest an arbitrary one out of the many accepted? And what about the other options (such as --governors)? Suggesting an abbreviated long form only for --performance would be inconsistent. The general convention is to list the one-letter form and the complete long form. Also, if you want to save typing during interactive use, you can use -c.

#6 lore raw

PATCH v5 3/4 cpupower-frequency-info.1: document --boost and --epp options

In reply to Roberto Ricci

cpupower frequency-info supports the '--boost' option since the program was first added with commit 7fe2f6399a84 ("cpupowerutils - cpufrequtils extended with quite some features"), but the man page lacks it.

'--epp' has been added with commit 5f567afc283f ("cpupower: Add support for showing energy performance preference") but it has never been added to the man page.

cpufreq-info.c:

	{"boost",	 no_argument,		 NULL,	 'b'},
	...
	{"epp",		 no_argument,		 NULL,	 'z'},
---
 tools/power/cpupower/man/cpupower-frequency-info.1 | 6 ++++++
 1 file changed, 6 insertions(+)
tools/power/cpupower/man/cpupower-frequency-info.1 +6 -0
index 1173d4f31e69..b0d69c9adcbd 100644
@@ -32,6 +32,12 @@ Gets the currently used cpufreq policy.
 \fB\-g\fR \fB\-\-governors\fR
 Determines available cpufreq governors.
 .TP  
+\fB\-b\fR \fB\-\-boost\fR
+Gets the current boost state support.
+.TP
+\fB\-z\fR \fB\-\-epp\fR
+Gets the current EPP (energy performance preference).
+.TP
 \fB\-r\fR \fB\-\-related\-cpus\fR
 Determines which CPUs run at the same hardware frequency.
 .TP  
Signature · 1 line
2.53.0
#7 lore raw

PATCH v5 4/4 cpupower-info.1: describe the --perf-bias option

In reply to Roberto Ricci

The cpupower-info(1) man page only mentions the short form of the '--perf-bias' option in the synopsys, but the long form is not documented and its effect is not explained.

cpupower-info.c:

     {"perf-bias", optional_argument, NULL, 'b'},
---
 tools/power/cpupower/man/cpupower-info.1 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
tools/power/cpupower/man/cpupower-info.1 +8 -1
index 340bcd0be7de..1f42d8c388a0 100644
@@ -3,7 +3,7 @@
 cpupower\-info \- Shows processor power related kernel or hardware configurations
 .SH SYNOPSIS
 .ft B
-.B cpupower info [ \-b ]
+.B cpupower info [\fIoptions\fP]
 
 .SH DESCRIPTION
 \fBcpupower info \fP shows kernel configurations or processor hardware
@@ -13,6 +13,13 @@ Some options are platform wide, some affect single cores. By default values
 of core zero are displayed only. cpupower --cpu all cpuinfo will show the
 settings of all cores, see cpupower(1) how to choose specific cores.
 
+.SH "OPTIONS"
+.LP
+.TP
+\fB\-b\fR \fB\-\-perf-bias\fR
+Gets the current performance bias value.
+.TP
+
 .SH "SEE ALSO"
 Options are described in detail in:
 
Signature · 1 line
2.53.0
maintainer Applied
#8 lore raw
In reply to Roberto Ricci
Quoted 10 lines · Roberto Ricci

This patch series fixes a few issues with the cpupower manual pages, such as missing or incorrect options and trailing whitespace.

---
Changes in v5:
- Drop whitespace removal patches
Link to v4: https://lore.kernel.org/linux-pm/[email protected]/

Applied to my cpupower branch - I will send this my next pr to PM maintainer.

https://web.git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git/log/?h=cpupower

thanks,
-- Shuah