Lines Matching +full:idle +full:- +full:states

1 .. SPDX-License-Identifier: GPL-2.0
10 CPU Idle Time Management
18 CPU Idle Time Management Subsystem
23 cores) is idle after an interrupt or equivalent wakeup event, which means that
24 there are no tasks to run on it except for the special "idle" task associated
26 belongs to. That can be done by making the idle logical CPU stop fetching
28 depended on by it into an idle state in which they will draw less power.
30 However, there may be multiple different idle states that can be used in such a
33 particular idle state. That is the role of the CPU idle time management
40 units: *governors* responsible for selecting idle states to ask the processor
45 CPU Idle Time Governors
48 A CPU idle time (``CPUIdle``) governor is a bundle of policy code invoked when
49 one of the logical CPUs in the system turns out to be idle. Its role is to
50 select an idle state to ask the processor to enter in order to save some energy.
91 |struct cpuidle_state| objects representing idle states that the
95 code, and that causes the kernel to run the architecture-specific
96 default code for idle CPUs on the CPU in question instead of ``CPUIdle``
97 until the ``->enable()`` governor callback is invoked for that CPU
109 It is expected to reverse any changes made by the ``->enable()``
119 Called to select an idle state for the processor holding the (logical)
123 The list of idle states to take into consideration is represented by the
124 :c:member:`states` array of |struct cpuidle_state| objects held by the
132 idle state. When the ``bool`` variable pointed to by it (which is set
134 processor will be asked to enter the selected idle state without
137 asking the processor to enter the idle state).
148 Called to allow the governor to evaluate the accuracy of the idle state
149 selection made by the ``->select()`` callback (when it was invoked last
151 idle state selections in the future.
155 account when selecting idle states. In order to obtain the current effective
158 :c:func:`cpuidle_governor_latency_req()`. Then, the governor's ``->select()``
164 CPU Idle Time Management Drivers
167 CPU idle time management (``CPUIdle``) drivers provide an interface between the
170 First of all, a ``CPUIdle`` driver has to populate the :c:member:`states` array
173 idle states that the processor hardware can be asked to enter shared by all of
176 The entries in the :c:member:`states` array are expected to be sorted by the
178 the ascending order (that is, index 0 should correspond to the idle state with
181 idle state represented by the |struct cpuidle_state| object holding it, this
182 sorting order should be the same as the ascending sorting order by the idle
186 governors for computations related to idle state selection:
189 Minimum time to spend in this idle state including the time needed to
191 be saved by staying in a shallower idle state for the same amount of
195 Maximum time it will take a CPU asking the processor to enter this idle
200 Flags representing idle state properties. Currently, governors only use
202 does not represent a real idle state, but an interface to a software
204 any idle state at all. [There are other flags used by the ``CPUIdle``
209 enter this particular idle state:
220 :c:member:`states` array representing the idle state to ask the processor to
223 The analogous ``->enter_s2idle()`` callback in |struct cpuidle_state| is used
224 only for implementing the suspend-to-idle system-wide power management feature.
225 The difference between in and ``->enter()`` is that it must not re-enable
226 interrupts at any point (even temporarily) or attempt to change the states of
227 clock event devices, which the ``->enter()`` callback may do sometimes.
229 Once the :c:member:`states` array has been populated, the number of valid
232 entries in the :c:member:`states` array represent "coupled" idle states (that
233 is, idle states that can only be asked for if multiple related logical CPUs are
234 idle), the :c:member:`safe_state_index` field in |struct cpuidle_driver| needs
235 to be the index of an idle state that is not "coupled" (that is, one that can be
236 asked for if only one logical CPU is idle).
244 are no "coupled" idle state entries in the driver's :c:member:`states` array,
260 ``sysfs`` interface to be created and the governor's ``->enable()`` callback to
276 lead to modifications of the list of available processor idle states (which can
282 change. Next, it can update its :c:member:`states` array in accordance with