Lines Matching full:policy
85 ``CPUFreq`` Policy Objects
104 of its user space interface is based on the policy concept.
129 Once invoked, the ``CPUFreq`` core checks if the policy pointer is already set
130 for the given CPU and if so, it skips the policy object creation. Otherwise,
131 a new policy object is created and initialized, which involves the creation of
132 a new policy directory in ``sysfs``, and the policy pointer corresponding to
133 the given CPU is set to the new policy object's address in memory.
135 Next, the scaling driver's ``->init()`` callback is invoked with the policy
139 to, represented by its policy object) and, if the policy object it has been
140 called for is new, to set parameters of the policy, like the minimum and maximum
143 that belong to the same policy (including both online and offline CPUs). That
144 mask is then used by the core to populate the policy pointers for all of the
147 The next major initialization step for a new policy object is to attach a
150 later via ``sysfs``). First, a pointer to the new policy object is passed to
152 data structures necessary to handle the given policy and, possibly, to add
157 all of the online CPUs belonging to the given policy with the CPU scheduler.
162 to determine the P-state to use for the given policy going forward and to
168 Similar steps are taken for policy objects that are not new, but were "inactive"
171 to use the scaling governor previously used with the policy that became
175 other CPUs sharing the policy object with it are online already, there is no
176 need to re-initialize the policy object at all. In that case, it only is
179 ``->start()`` callbacks, in this order, for the entire policy.
184 new policy objects. Instead, the driver's ``->setpolicy()`` callback is invoked
185 to register per-CPU utilization update callbacks for each policy. These
191 The policy objects created during CPU initialization and other data structures
194 when the last CPU belonging to the given policy in unregistered.
197 Policy Interface in ``sysfs``
205 integer number) for every policy object maintained by the ``CPUFreq`` core.
209 associated with (or belonging to) the given policy. The ``policyX`` directories
210 in :file:`/sys/devices/system/cpu/cpufreq` each contain policy-specific
211 attributes (files) to control ``CPUFreq`` behavior for the corresponding policy
216 and what scaling governor is attached to the given policy. Some scaling drivers
217 also add driver-specific attributes to the policy directories in ``sysfs`` to
218 control policy-specific aspects of driver behavior.
224 List of online CPUs belonging to this policy (i.e. sharing the hardware
225 performance scaling interface represented by the ``policyX`` policy
244 Current frequency of the CPUs belonging to this policy as obtained from
252 Maximum possible operating frequency the CPUs belonging to this policy
256 Minimum possible operating frequency the CPUs belonging to this policy
260 The time it takes to switch the CPUs belonging to this policy from one
268 List of all (online and offline) CPUs belonging to this policy.
271 List of available frequencies of the CPUs belonging to this policy
276 be attached to this policy or (if the |intel_pstate| scaling driver is
278 applied to this policy.
285 Current frequency of all of the CPUs belonging to this policy (in kHz).
302 The scaling governor currently attached to this policy or (if the
304 provided by the driver that is currently applied to this policy.
307 governor to be attached to this policy or a new scaling algorithm
314 Maximum frequency the CPUs belonging to this policy are allowed to be
322 Minimum frequency the CPUs belonging to this policy are allowed to be
331 is attached to the given policy.
334 be written to in order to set a new frequency for the policy.
344 Scaling governors are attached to policy objects and different policy objects
348 The scaling governor for a given policy object can be changed at any time with
349 the help of the ``scaling_governor`` policy attribute in ``sysfs``.
353 tunables, can be either global (system-wide) or per-policy, depending on the
355 per-policy, they are located in a subdirectory of each policy directory.
364 When attached to a policy object, this governor causes the highest frequency,
365 within the ``scaling_max_freq`` policy limit, to be requested for that policy.
367 The request is made once at that time the governor for the policy is set to
369 policy limits change after that.
374 When attached to a policy object, this governor causes the lowest frequency,
375 within the ``scaling_min_freq`` policy limit, to be requested for that policy.
377 The request is made once at that time the governor for the policy is set to
379 policy limits change after that.
385 to set the CPU frequency for the policy it is attached to by writing to the
386 ``scaling_setspeed`` attribute of that policy.
397 should be changed for a given policy (that depends on whether or not the driver
403 the allowed maximum (that is, the ``scaling_max_freq`` policy limit). In turn,
414 policy (if the PELT number is frequency-invariant), or the current CPU frequency
451 If this governor is attached to a policy shared by multiple CPUs, the load is
453 for the entire policy.
465 the value of the ``cpuinfo_max_freq`` policy attribute corresponds to the load of
466 1 (or 100%), and the value of the ``cpuinfo_min_freq`` policy attribute
469 it is allowed to use (the ``scaling_max_freq`` policy limit).
479 to ``cpuinfo_transition_latency`` on each policy this governor is
483 If this tunable is per-policy, the following shell command sets the time
491 will set the frequency to the maximum value allowed for the policy.
572 allowed to set (the ``scaling_max_freq`` policy limit), between 0 and
579 ``scaling_max_freq`` policy limits.
688 If present, that knob is located in every ``CPUFreq`` policy directory in
692 for one policy causes the same value of it to be set for all of the other