• Home
  • Raw
  • Download

Lines Matching +full:no +full:- +full:tick +full:- +full:in +full:- +full:suspend

1 .. SPDX-License-Identifier: GPL-2.0
21 Every time one of the logical CPUs in the system (the entities that appear to
24 there are no tasks to run on it except for the special "idle" task associated
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
31 situation in principle, so it may be necessary to find the most suitable one
34 subsystem in the kernel, called ``CPUIdle``.
37 principle, so the generic code that in principle need not depend on the hardware
38 or platform design details in it is separate from the code that interacts with
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.
66 only one in the list (that is, the list was empty before) or the value of its
68 governor currently in use, or the name of the new governor was passed to the
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
94 It may fail, in which case it is expected to return a negative error
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()``
131 the scheduler tick before asking the processor to enter the selected
135 stopping the scheduler tick on the given CPU (if the tick has been
140 in |struct cpuidle_governor| must not be ``NULL`` for the registration
149 selection made by the ``->select()`` callback (when it was invoked last
151 idle state selections in the future.
153 In addition, ``CPUIdle`` governors are required to take power management
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()``
171 of |struct cpuidle_state| objects included in the |struct cpuidle_driver| object
176 The entries in the :c:member:`states` array are expected to be sorted by the
177 value of the :c:member:`target_residency` field in |struct cpuidle_state| in
185 Three fields in |struct cpuidle_state| are used by the existing ``CPUIdle``
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
192 time, in microseconds.
197 in microseconds.
203 "loop" that can be used in order to avoid asking the processor to enter
205 core in special situations.]
207 The :c:member:`enter` callback pointer in |struct cpuidle_state|, which must not
208 be ``NULL``, points to the routine to execute in order to ask the processor to
219 and the last one is an index of the |struct cpuidle_state| entry in the driver's
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
227 clock event devices, which the ``->enter()`` callback may do sometimes.
230 entries in it has to be stored in the :c:member:`state_count` field of the
232 entries in the :c:member:`states` array represent "coupled" idle states (that
234 idle), the :c:member:`safe_state_index` field in |struct cpuidle_driver| needs
238 In addition to that, if the given ``CPUIdle`` driver is only going to handle a
239 subset of logical CPUs in the system, the :c:member:`cpumask` field in its
244 are no "coupled" idle state entries in the driver's :c:member:`states` array,
257 registration in all cases.
260 ``sysfs`` interface to be created and the governor's ``->enable()`` callback to
262 registering the driver that will handle the CPU in question.
282 change. Next, it can update its :c:member:`states` array in accordance with