Lines Matching refs:CPU
7 CPU Performance Scaling
15 The Concept of CPU Performance Scaling
22 can be retired by the CPU over a unit of time, but also the higher the clock
24 time (or the more power is drawn) by the CPU in the given P-state. Therefore
25 there is a natural tradeoff between the CPU capacity (the number of instructions
26 that can be executed over a unit of time) and the power drawn by the CPU.
32 instructions so quickly and maintaining the highest available CPU capacity for a
34 It also may not be physically possible to maintain maximum CPU capacity for too
40 Typically, they are used along with algorithms to estimate the required CPU
44 to as CPU performance scaling or CPU frequency scaling (because it involves
45 adjusting the CPU clock frequency).
48 CPU Performance Scaling in Linux
51 The Linux kernel supports CPU performance scaling by means of the ``CPUFreq``
52 (CPU Frequency scaling) subsystem that consists of three layers of code: the
56 interfaces for all platforms that support CPU performance scaling. It defines
59 Scaling governors implement algorithms to estimate the required CPU capacity.
65 access platform-specific hardware interfaces to change CPU P-states as requested
95 struct cpufreq_policy is also used when there is only one CPU in the given
99 every CPU in the system, including CPUs that are currently offline. If multiple
107 CPU Initialization
114 The scaling driver may be registered before or after CPU registration. If
121 In any case, the ``CPUFreq`` core is invoked to take note of any logical CPU it
122 has not seen so far as soon as it is ready to handle that CPU. [Note that the
123 logical CPU may be a physical single-core processor, or a single core in a
125 core. In what follows "CPU" always means "logical CPU" unless explicitly stated
130 for the given CPU and if so, it skips the policy object creation. Otherwise,
133 the given CPU is set to the new policy object's address in memory.
136 pointer of the new CPU passed to it as the argument. That callback is expected
137 to initialize the performance scaling hardware interface for the given CPU (or,
156 That callback is expected to register per-CPU utilization update callbacks for
157 all of the online CPUs belonging to the given policy with the CPU scheduler.
158 The utilization update callbacks will be invoked by the CPU scheduler on
160 scheduler tick or generally whenever the CPU utilization may change (from the
174 In turn, if a previously offline CPU is being brought back online, but some
177 necessary to restart the scaling governor so that it can take the new online CPU
185 to register per-CPU utilization update callbacks for each policy. These
186 callbacks are invoked by the CPU scheduler in the same way as for scaling
191 The policy objects created during CPU initialization and other data structures
194 when the last CPU belonging to the given policy in unregistered.
230 CPU frequencies, that limit will be reported through this attribute (if
286 the CPU is actually running at (due to hardware design and other
290 more precisely reflecting the current CPU frequency through this
291 attribute, but that still may not be the exact current CPU frequency as
381 to set the CPU frequency for the policy it is attached to by writing to the
387 This governor uses CPU utilization data available from the CPU scheduler. It
388 generally is regarded as a part of the CPU scheduler, so it can access the
392 invoke the scaling driver asynchronously when it decides that the CPU frequency
394 is capable of changing the CPU frequency from scheduler context).
396 The actions of this governor for a particular CPU depend on the scheduling class
397 invoking its utilization update callback for that CPU. If it is invoked by the
402 given CPU as the CPU utilization estimate (see the *Per-entity load tracking*
404 CPU frequency to apply is computed in accordance with the formula
409 ``util``, and ``f_0`` is either the maximum possible CPU frequency for the given
410 policy (if the PELT number is frequency-invariant), or the current CPU frequency
414 CPU frequency for tasks that have been waiting on I/O most recently, called
432 tightly integrated with the CPU scheduler, its overhead in terms of CPU context
433 switches and similar is less significant, and it uses the scheduler's own CPU
440 This governor uses CPU load as a CPU frequency selection metric.
442 In order to estimate the current CPU load, it measures the time elapsed between
444 time in which the given CPU was not idle. The ratio of the non-idle (active)
445 time to the total CPU time is taken as an estimate of the load.
452 invoked asynchronously (via a workqueue) and CPU P-states are updated from
454 governor is minimum, but it causes additional CPU context switches to happen
455 relatively often and the CPU P-state updates triggered by it can be relatively
456 irregular. Also, it affects its own CPU load metric by running code that
457 reduces the CPU idle time (even though the CPU idle time is only reduced very
460 It generally selects CPU frequencies proportional to the estimated load, so that
486 If the estimated CPU load is above this value (in percent), the governor
489 CPU load.
492 If set to 1 (default 0), it will cause the CPU load estimation code to
493 treat the CPU time spent on executing tasks with "nice" levels greater
494 than 0 as CPU idle time.
503 the ``sampling_rate`` value if the CPU load goes above ``up_threshold``.
510 at the cost of additional energy spent on maintaining the maximum CPU
516 value is exceeded by the estimated CPU load) or sensitivity threshold
536 workload running on a CPU will change in response to frequency changes.
540 the CPU frequency, whereas workloads with the sensitivity of 100%
541 (CPU-bound) are expected to perform much better if the CPU frequency is
548 from running at higher CPU frequencies.
553 This governor uses CPU load as a CPU frequency selection metric.
555 It estimates the CPU load in the same way as the `ondemand`_ governor described
556 above, but the CPU frequency selection algorithm implemented by it is different.
562 (configurable) threshold has been exceeded by the estimated CPU load.
581 If the estimated CPU load is greater than this value, the frequency will
615 into a special state in which it can control the CPU frequency within certain
645 CPU performance on time scales below software resolution (e.g. below the