Skip to content

Commit 7395683

Browse files
guohanjunrafaeljw
authored andcommitted
Documentation: cpuidle: update the document
Update the document after the remove of cpuidle_sysfs_switch. Signed-off-by: Hanjun Guo <[email protected]> Reviewed-by: Doug Smythies <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent cce55cc commit 7395683

File tree

3 files changed

+20
-29
lines changed

3 files changed

+20
-29
lines changed

Documentation/ABI/testing/sysfs-devices-system-cpu

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ Description: CPU topology files that describe a logical CPU's relationship
106106
See Documentation/admin-guide/cputopology.rst for more information.
107107

108108

109-
What: /sys/devices/system/cpu/cpuidle/current_driver
110-
/sys/devices/system/cpu/cpuidle/current_governer_ro
111-
/sys/devices/system/cpu/cpuidle/available_governors
109+
What: /sys/devices/system/cpu/cpuidle/available_governors
110+
/sys/devices/system/cpu/cpuidle/current_driver
112111
/sys/devices/system/cpu/cpuidle/current_governor
112+
/sys/devices/system/cpu/cpuidle/current_governer_ro
113113
Date: September 2007
114114
Contact: Linux kernel mailing list <[email protected]>
115115
Description: Discover cpuidle policy and mechanism
@@ -119,24 +119,18 @@ Description: Discover cpuidle policy and mechanism
119119
consumption during idle.
120120

121121
Idle policy (governor) is differentiated from idle mechanism
122-
(driver)
123-
124-
current_driver: (RO) displays current idle mechanism
125-
126-
current_governor_ro: (RO) displays current idle policy
127-
128-
With the cpuidle_sysfs_switch boot option enabled (meant for
129-
developer testing), the following three attributes are visible
130-
instead:
131-
132-
current_driver: same as described above
122+
(driver).
133123

134124
available_governors: (RO) displays a space separated list of
135-
available governors
125+
available governors.
126+
127+
current_driver: (RO) displays current idle mechanism.
136128

137129
current_governor: (RW) displays current idle policy. Users can
138130
switch the governor at runtime by writing to this file.
139131

132+
current_governor_ro: (RO) displays current idle policy.
133+
140134
See Documentation/admin-guide/pm/cpuidle.rst and
141135
Documentation/driver-api/pm/cpuidle.rst for more information.
142136

Documentation/admin-guide/pm/cpuidle.rst

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,15 @@ governor uses that information depends on what algorithm is implemented by it
159159
and that is the primary reason for having more than one governor in the
160160
``CPUIdle`` subsystem.
161161

162-
There are three ``CPUIdle`` governors available, ``menu``, `TEO <teo-gov_>`_
163-
and ``ladder``. Which of them is used by default depends on the configuration
164-
of the kernel and in particular on whether or not the scheduler tick can be
165-
`stopped by the idle loop <idle-cpus-and-tick_>`_. It is possible to change the
166-
governor at run time if the ``cpuidle_sysfs_switch`` command line parameter has
167-
been passed to the kernel, but that is not safe in general, so it should not be
168-
done on production systems (that may change in the future, though). The name of
169-
the ``CPUIdle`` governor currently used by the kernel can be read from the
170-
:file:`current_governor_ro` (or :file:`current_governor` if
171-
``cpuidle_sysfs_switch`` is present in the kernel command line) file under
172-
:file:`/sys/devices/system/cpu/cpuidle/` in ``sysfs``.
162+
There are four ``CPUIdle`` governors available, ``menu``, `TEO <teo-gov_>`_,
163+
``ladder`` and ``haltpoll``. Which of them is used by default depends on the
164+
configuration of the kernel and in particular on whether or not the scheduler
165+
tick can be `stopped by the idle loop <idle-cpus-and-tick_>`_. Available
166+
governors can be read from the :file:`available_governors`, and the governor
167+
can be changed at runtime. The name of the ``CPUIdle`` governor currently
168+
used by the kernel can be read from the :file:`current_governor_ro` or
169+
:file:`current_governor` file under :file:`/sys/devices/system/cpu/cpuidle/`
170+
in ``sysfs``.
173171

174172
Which ``CPUIdle`` driver is used, on the other hand, usually depends on the
175173
platform the kernel is running on, but there are platforms with more than one

Documentation/driver-api/pm/cpuidle.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@ only one in the list (that is, the list was empty before) or the value of its
6868
governor currently in use, or the name of the new governor was passed to the
6969
kernel as the value of the ``cpuidle.governor=`` command line parameter, the new
7070
governor will be used from that point on (there can be only one ``CPUIdle``
71-
governor in use at a time). Also, if ``cpuidle_sysfs_switch`` is passed to the
72-
kernel in the command line, user space can choose the ``CPUIdle`` governor to
73-
use at run time via ``sysfs``.
71+
governor in use at a time). Also, user space can choose the ``CPUIdle``
72+
governor to use at run time via ``sysfs``.
7473

7574
Once registered, ``CPUIdle`` governors cannot be unregistered, so it is not
7675
practical to put them into loadable kernel modules.

0 commit comments

Comments
 (0)