79 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3==================================================4Collaborative Processor Performance Control (CPPC)5==================================================6 7.. _cppc_sysfs:8 9CPPC10====11 12CPPC defined in the ACPI spec describes a mechanism for the OS to manage the13performance of a logical processor on a contiguous and abstract performance14scale. CPPC exposes a set of registers to describe abstract performance scale,15to request performance levels and to measure per-cpu delivered performance.16 17For more details on CPPC please refer to the ACPI specification at:18 19http://uefi.org/specifications20 21Some of the CPPC registers are exposed via sysfs under::22 23 /sys/devices/system/cpu/cpuX/acpi_cppc/24 25for each cpu X::26 27 $ ls -lR /sys/devices/system/cpu/cpu0/acpi_cppc/28 /sys/devices/system/cpu/cpu0/acpi_cppc/:29 total 030 -r--r--r-- 1 root root 65536 Mar 5 19:38 feedback_ctrs31 -r--r--r-- 1 root root 65536 Mar 5 19:38 highest_perf32 -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_freq33 -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_nonlinear_perf34 -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_perf35 -r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_freq36 -r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_perf37 -r--r--r-- 1 root root 65536 Mar 5 19:38 reference_perf38 -r--r--r-- 1 root root 65536 Mar 5 19:38 wraparound_time39 40* highest_perf : Highest performance of this processor (abstract scale).41* nominal_perf : Highest sustained performance of this processor42 (abstract scale).43* lowest_nonlinear_perf : Lowest performance of this processor with nonlinear44 power savings (abstract scale).45* lowest_perf : Lowest performance of this processor (abstract scale).46 47* lowest_freq : CPU frequency corresponding to lowest_perf (in MHz).48* nominal_freq : CPU frequency corresponding to nominal_perf (in MHz).49 The above frequencies should only be used to report processor performance in50 frequency instead of abstract scale. These values should not be used for any51 functional decisions.52 53* feedback_ctrs : Includes both Reference and delivered performance counter.54 Reference counter ticks up proportional to processor's reference performance.55 Delivered counter ticks up proportional to processor's delivered performance.56* wraparound_time: Minimum time for the feedback counters to wraparound57 (seconds).58* reference_perf : Performance level at which reference performance counter59 accumulates (abstract scale).60 61 62Computing Average Delivered Performance63=======================================64 65Below describes the steps to compute the average performance delivered by66taking two different snapshots of feedback counters at time T1 and T2.67 68 T1: Read feedback_ctrs as fbc_t169 Wait or run some workload70 71 T2: Read feedback_ctrs as fbc_t272 73::74 75 delivered_counter_delta = fbc_t2[del] - fbc_t1[del]76 reference_counter_delta = fbc_t2[ref] - fbc_t1[ref]77 78 delivered_perf = (reference_perf x delivered_counter_delta) / reference_counter_delta79