0001 .. SPDX-License-Identifier: GPL-2.0
0002
0003 ==================================================
0004 Collaborative Processor Performance Control (CPPC)
0005 ==================================================
0006
0007 .. _cppc_sysfs:
0008
0009 CPPC
0010 ====
0011
0012 CPPC defined in the ACPI spec describes a mechanism for the OS to manage the
0013 performance of a logical processor on a contiguous and abstract performance
0014 scale. CPPC exposes a set of registers to describe abstract performance scale,
0015 to request performance levels and to measure per-cpu delivered performance.
0016
0017 For more details on CPPC please refer to the ACPI specification at:
0018
0019 http://uefi.org/specifications
0020
0021 Some of the CPPC registers are exposed via sysfs under::
0022
0023 /sys/devices/system/cpu/cpuX/acpi_cppc/
0024
0025 for each cpu X::
0026
0027 $ ls -lR /sys/devices/system/cpu/cpu0/acpi_cppc/
0028 /sys/devices/system/cpu/cpu0/acpi_cppc/:
0029 total 0
0030 -r--r--r-- 1 root root 65536 Mar 5 19:38 feedback_ctrs
0031 -r--r--r-- 1 root root 65536 Mar 5 19:38 highest_perf
0032 -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_freq
0033 -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_nonlinear_perf
0034 -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_perf
0035 -r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_freq
0036 -r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_perf
0037 -r--r--r-- 1 root root 65536 Mar 5 19:38 reference_perf
0038 -r--r--r-- 1 root root 65536 Mar 5 19:38 wraparound_time
0039
0040 * highest_perf : Highest performance of this processor (abstract scale).
0041 * nominal_perf : Highest sustained performance of this processor
0042 (abstract scale).
0043 * lowest_nonlinear_perf : Lowest performance of this processor with nonlinear
0044 power savings (abstract scale).
0045 * lowest_perf : Lowest performance of this processor (abstract scale).
0046
0047 * lowest_freq : CPU frequency corresponding to lowest_perf (in MHz).
0048 * nominal_freq : CPU frequency corresponding to nominal_perf (in MHz).
0049 The above frequencies should only be used to report processor performance in
0050 frequency instead of abstract scale. These values should not be used for any
0051 functional decisions.
0052
0053 * feedback_ctrs : Includes both Reference and delivered performance counter.
0054 Reference counter ticks up proportional to processor's reference performance.
0055 Delivered counter ticks up proportional to processor's delivered performance.
0056 * wraparound_time: Minimum time for the feedback counters to wraparound
0057 (seconds).
0058 * reference_perf : Performance level at which reference performance counter
0059 accumulates (abstract scale).
0060
0061
0062 Computing Average Delivered Performance
0063 =======================================
0064
0065 Below describes the steps to compute the average performance delivered by
0066 taking two different snapshots of feedback counters at time T1 and T2.
0067
0068 T1: Read feedback_ctrs as fbc_t1
0069 Wait or run some workload
0070
0071 T2: Read feedback_ctrs as fbc_t2
0072
0073 ::
0074
0075 delivered_counter_delta = fbc_t2[del] - fbc_t1[del]
0076 reference_counter_delta = fbc_t2[ref] - fbc_t1[ref]
0077
0078 delivered_perf = (refernce_perf x delivered_counter_delta) / reference_counter_delta