Lines Matching +full:no +full:- +full:tick +full:- +full:in +full:- +full:suspend
1 .. SPDX-License-Identifier: GPL-2.0
16 Every time one of the logical CPUs in the system (the entities that appear to
19 there are no tasks to run on it except for the special "idle" task associated
23 depended on by it into an idle state in which they will draw less power.
25 However, there may be multiple different idle states that can be used in such a
26 situation in principle, so it may be necessary to find the most suitable one
29 subsystem in the kernel, called ``CPUIdle``.
32 principle, so the generic code that in principle need not depend on the hardware
33 or platform design details in it is separate from the code that interacts with
44 one of the logical CPUs in the system turns out to be idle. Its role is to
45 select an idle state to ask the processor to enter in order to save some energy.
61 only one in the list (that is, the list was empty before) or the value of its
63 governor currently in use, or the name of the new governor was passed to the
66 governor in use at a time). Also, user space can choose the ``CPUIdle``
88 It may fail, in which case it is expected to return a negative error
89 code, and that causes the kernel to run the architecture-specific
90 default code for idle CPUs on the CPU in question instead of ``CPUIdle``
91 until the ``->enable()`` governor callback is invoked for that CPU
103 It is expected to reverse any changes made by the ``->enable()``
125 the scheduler tick before asking the processor to enter the selected
129 stopping the scheduler tick on the given CPU (if the tick has been
134 in struct cpuidle_governor must not be ``NULL`` for the registration
143 selection made by the ``->select()`` callback (when it was invoked last
145 idle state selections in the future.
147 In addition, ``CPUIdle`` governors are required to take power management
149 account when selecting idle states. In order to obtain the current effective
152 :c:func:`cpuidle_governor_latency_req()`. Then, the governor's ``->select()``
165 of struct cpuidle_state objects included in the struct cpuidle_driver object
170 The entries in the :c:member:`states` array are expected to be sorted by the
171 value of the :c:member:`target_residency` field in struct cpuidle_state in
179 Three fields in struct cpuidle_state are used by the existing ``CPUIdle``
183 Minimum time to spend in this idle state including the time needed to
185 be saved by staying in a shallower idle state for the same amount of
186 time, in microseconds.
191 in microseconds.
197 "loop" that can be used in order to avoid asking the processor to enter
199 core in special situations.]
201 The :c:member:`enter` callback pointer in struct cpuidle_state, which must not
202 be ``NULL``, points to the routine to execute in order to ask the processor to
213 and the last one is an index of the struct cpuidle_state entry in the driver's
217 The analogous ``->enter_s2idle()`` callback in struct cpuidle_state is used
218 only for implementing the suspend-to-idle system-wide power management feature.
219 The difference between in and ``->enter()`` is that it must not re-enable
221 clock event devices, which the ``->enter()`` callback may do sometimes.
224 entries in it has to be stored in the :c:member:`state_count` field of the
226 entries in the :c:member:`states` array represent "coupled" idle states (that
228 idle), the :c:member:`safe_state_index` field in struct cpuidle_driver needs
232 In addition to that, if the given ``CPUIdle`` driver is only going to handle a
233 subset of logical CPUs in the system, the :c:member:`cpumask` field in its
238 are no "coupled" idle state entries in the driver's :c:member:`states` array,
251 registration in all cases.
254 ``sysfs`` interface to be created and the governor's ``->enable()`` callback to
256 registering the driver that will handle the CPU in question.
276 change. Next, it can update its :c:member:`states` array in accordance with