1 .. SPDX-License-Identifier: GPL-2.0
3 ==================================================
4 Collaborative Processor Performance Control (CPPC)
5 ==================================================
10 CPPC defined in the ACPI spec describes a mechanism for the OS to manage the
11 performance of a logical processor on a contiguous and abstract performance
12 scale. CPPC exposes a set of registers to describe abstract performance scale,
13 to request performance levels and to measure per-cpu delivered performance.
15 For more details on CPPC please refer to the ACPI specification at:
17 http://uefi.org/specifications
19 Some of the CPPC registers are exposed via sysfs under::
21 /sys/devices/system/cpu/cpuX/acpi_cppc/
25 $ ls -lR /sys/devices/system/cpu/cpu0/acpi_cppc/
26 /sys/devices/system/cpu/cpu0/acpi_cppc/:
28 -r--r--r-- 1 root root 65536 Mar 5 19:38 feedback_ctrs
29 -r--r--r-- 1 root root 65536 Mar 5 19:38 highest_perf
30 -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_freq
31 -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_nonlinear_perf
32 -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_perf
33 -r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_freq
34 -r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_perf
35 -r--r--r-- 1 root root 65536 Mar 5 19:38 reference_perf
36 -r--r--r-- 1 root root 65536 Mar 5 19:38 wraparound_time
38 * highest_perf : Highest performance of this processor (abstract scale).
39 * nominal_perf : Highest sustained performance of this processor
41 * lowest_nonlinear_perf : Lowest performance of this processor with nonlinear
42 power savings (abstract scale).
43 * lowest_perf : Lowest performance of this processor (abstract scale).
45 * lowest_freq : CPU frequency corresponding to lowest_perf (in MHz).
46 * nominal_freq : CPU frequency corresponding to nominal_perf (in MHz).
47 The above frequencies should only be used to report processor performance in
48 frequency instead of abstract scale. These values should not be used for any
51 * feedback_ctrs : Includes both Reference and delivered performance counter.
52 Reference counter ticks up proportional to processor's reference performance.
53 Delivered counter ticks up proportional to processor's delivered performance.
54 * wraparound_time: Minimum time for the feedback counters to wraparound
56 * reference_perf : Performance level at which reference performance counter
57 accumulates (abstract scale).
60 Computing Average Delivered Performance
61 =======================================
63 Below describes the steps to compute the average performance delivered by
64 taking two different snapshots of feedback counters at time T1 and T2.
66 T1: Read feedback_ctrs as fbc_t1
67 Wait or run some workload
69 T2: Read feedback_ctrs as fbc_t2
73 delivered_counter_delta = fbc_t2[del] - fbc_t1[del]
74 reference_counter_delta = fbc_t2[ref] - fbc_t1[ref]
76 delivered_perf = (refernce_perf x delivered_counter_delta) / reference_counter_delta