cppc_sysfs.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. Collaborative Processor Performance Control (CPPC)
  2. CPPC defined in the ACPI spec describes a mechanism for the OS to manage the
  3. performance of a logical processor on a contigious and abstract performance
  4. scale. CPPC exposes a set of registers to describe abstract performance scale,
  5. to request performance levels and to measure per-cpu delivered performance.
  6. For more details on CPPC please refer to the ACPI specification at:
  7. http://uefi.org/specifications
  8. Some of the CPPC registers are exposed via sysfs under:
  9. /sys/devices/system/cpu/cpuX/acpi_cppc/
  10. for each cpu X
  11. --------------------------------------------------------------------------------
  12. $ ls -lR /sys/devices/system/cpu/cpu0/acpi_cppc/
  13. /sys/devices/system/cpu/cpu0/acpi_cppc/:
  14. total 0
  15. -r--r--r-- 1 root root 65536 Mar 5 19:38 feedback_ctrs
  16. -r--r--r-- 1 root root 65536 Mar 5 19:38 highest_perf
  17. -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_freq
  18. -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_nonlinear_perf
  19. -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_perf
  20. -r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_freq
  21. -r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_perf
  22. -r--r--r-- 1 root root 65536 Mar 5 19:38 reference_perf
  23. -r--r--r-- 1 root root 65536 Mar 5 19:38 wraparound_time
  24. --------------------------------------------------------------------------------
  25. * highest_perf : Highest performance of this processor (abstract scale).
  26. * nominal_perf : Highest sustained performance of this processor (abstract scale).
  27. * lowest_nonlinear_perf : Lowest performance of this processor with nonlinear
  28. power savings (abstract scale).
  29. * lowest_perf : Lowest performance of this processor (abstract scale).
  30. * lowest_freq : CPU frequency corresponding to lowest_perf (in MHz).
  31. * nominal_freq : CPU frequency corresponding to nominal_perf (in MHz).
  32. The above frequencies should only be used to report processor performance in
  33. freqency instead of abstract scale. These values should not be used for any
  34. functional decisions.
  35. * feedback_ctrs : Includes both Reference and delivered performance counter.
  36. Reference counter ticks up proportional to processor's reference performance.
  37. Delivered counter ticks up proportional to processor's delivered performance.
  38. * wraparound_time: Minimum time for the feedback counters to wraparound (seconds).
  39. * reference_perf : Performance level at which reference performance counter
  40. accumulates (abstract scale).
  41. --------------------------------------------------------------------------------
  42. Computing Average Delivered Performance
  43. Below describes the steps to compute the average performance delivered by taking
  44. two different snapshots of feedback counters at time T1 and T2.
  45. T1: Read feedback_ctrs as fbc_t1
  46. Wait or run some workload
  47. T2: Read feedback_ctrs as fbc_t2
  48. delivered_counter_delta = fbc_t2[del] - fbc_t1[del]
  49. reference_counter_delta = fbc_t2[ref] - fbc_t1[ref]
  50. delivered_perf = (refernce_perf x delivered_counter_delta) / reference_counter_delta