Lines Matching full:amd

5 ``amd-pstate`` CPU Performance Scaling Driver
10 :Author: Huang Rui <ray.huang@amd.com>
16 ``amd-pstate`` is the AMD CPU performance scaling driver that introduces a
17 new CPU frequency control mechanism on modern AMD APU and CPU series in
20 than legacy ACPI hardware P-States. Current AMD CPU/APU platforms are using
26 ``amd-pstate`` leverages the Linux kernel governors such as ``schedutil``,
30 Volume 2: System Programming [1]_). Currently, ``amd-pstate`` supports basic
32 Zen2 and Zen3 processors, and we will implement more AMD specific functions
36 AMD CPPC Overview
43 hints as a relative target to the infrastructure limits. AMD processors
45 interpreter for performance adjustments. ``amd-pstate`` will initialize a
83 AMD P-States Performance Scale
88 AMD CPPC Performance Capability
117 effectively conveys the most efficient performance level to ``amd-pstate``.
127 AMD CPPC Performance Control
130 ``amd-pstate`` passes performance goals through these registers. The
136 ``amd-pstate`` specifies the minimum allowed performance level.
141 ``amd-pstate`` specifies a limit the maximum performance that is expected
147 ``amd-pstate`` specifies a desired target in the CPPC performance scale as
165 ``amd-pstate`` can be used with all the (generic) scaling governors listed
173 ``amd-pstate`` mainly supports ``schedutil`` and ``ondemand`` for dynamic
175 ``amd-pstate`` to the ``schedutil`` with CPU CFS scheduler. ``amd-pstate``
182 Then, ``amd-pstate`` updates the desired performance according to the CPU
190 The ``amd-pstate`` initialization will fail if the ``_CPC`` entry in the ACPI
193 ACPI hardware P-States function, so when ``amd-pstate`` fails initialization,
196 There are two types of hardware implementations for ``amd-pstate``: one is
200 Reference (PPR) for AMD Family 19h Model 51h, Revision A1 Processors [3]_.)
201 ``amd-pstate`` is to register different ``static_call`` instances for different
204 Currently, some of the Zen2 and Zen3 processors support ``amd-pstate``. In the
205 future, it will be supported on more and more AMD processors.
212 ``amd-pstate`` can handle the MSR register to implement the fast switch
221 processor supports the shared memory solution. In this case, ``amd-pstate``
227 AMD P-States and ACPI hardware P-States always can be supported in one
228 processor. But AMD P-States has the higher priority and if it is enabled
230 to the request from AMD P-States.
236 ``amd-pstate`` exposes several global attributes (files) in ``sysfs`` to
240 root@hr-test1:/home/ray# ls /sys/devices/system/cpu/cpufreq/policy0/*amd*
250 performance supported in `AMD CPPC Performance Capability <perf_cap_>`_).
261 lowest non-linear performance in `AMD CPPC Performance Capability
315 ``amd-pstate`` vs ``acpi-cpufreq``
318 On the majority of AMD platforms supported by ``acpi-cpufreq``, the ACPI tables
320 only provide 3 P-states on AMD processors.
321 However, on modern AMD APU and CPU series, hardware provides the Collaborative
323 for AMD platforms. That is, fine-grained and continuous frequency ranges
324 instead of the legacy hardware P-states. ``amd-pstate`` is the kernel
325 module which supports the new AMD P-States mechanism on most of the future AMD
326 platforms. The AMD P-States mechanism is the more performance and energy
327 efficiency frequency management method on AMD processors.
330 ``amd-pstate`` Driver Operation Modes
383 ``amd-pstate`` Preferred Core
388 infrastructure limits. Consequently, AMD has redefined the concept of
394 ``amd-pstate`` preferred core enables the scheduler to prefer scheduling on
399 The priority metric will be initialized by the ``amd-pstate`` driver. The ``amd-pstate``
400 driver will also determine whether or not ``amd-pstate`` preferred core is
403 ``amd-pstate`` driver will provide an initial core ordering when the system boots.
406 with highest performance firstly for scheduling the process. When ``amd-pstate``
410 ``amd-pstate`` Preferred Core Switch
415 ``amd-pstate`` peferred core`` has two states: enable and disable.
417 Default enable ``amd-pstate`` preferred core.
421 For systems that support ``amd-pstate`` preferred core, the core rankings will
431 ``amd-pstate`` exposes several global attributes (files) in ``sysfs`` to
461 Enable the ``amd-pstate`` preferred core.
464 Disable the ``amd-pstate`` preferred core
470 ``cpupower`` tool support for ``amd-pstate``
473 ``amd-pstate`` is supported by the ``cpupower`` tool, which can be used to dump
475 operations for the new ``amd-pstate`` module with this tool. ::
479 driver: amd-pstate
493 AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.68 GHz.
494 AMD PSTATE Nominal Performance: 117. Nominal Frequency: 3.30 GHz.
495 AMD PSTATE Lowest Non-linear Performance: 39. Lowest Non-linear Frequency: 1.10 GHz.
496 AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
505 There are two static trace events that can be used for ``amd-pstate``
508 specific to ``amd-pstate``. The following sequence of shell commands can
542 ``amd_pstate_tracer.py`` can record and parse ``amd-pstate`` trace log, then
544 performance of ``amd-pstate`` driver. The tracer tool needs to import intel
564 Unit Tests for amd-pstate
567 ``amd-pstate-ut`` is a test module for testing the ``amd-pstate`` driver.
579 Test prerequisite and basic functions for the ``amd-pstate`` driver.
588 …| 2 | amd_pstate_ut_check_enabled || Check whether AMD P-State is enabled. …
590 …| | || AMD P-States and ACPI hardware P-States always can b…
591 …| | | But AMD P-States has the higher priority and if it is…
593 …| | | request from AMD P-States. …
622 We create ``amd-pstate-ut`` module and tie it into kselftest.(for
645 $ sudo ./kselftest/run_kselftest.sh -c amd-pstate
649 $ cd ~/kselftest/amd-pstate
667 [-i <amd tracer interval>]
695 …+ amd-pstate-ondemand | 1 | | | |…
697 …+ amd-pstate-ondemand | 2 | | | |…
699 …+ amd-pstate-ondemand | 3 | | | |…
701 …+ amd-pstate-ondemand | Average | | | |…
703 …+ amd-pstate-schedutil | 1 | 165.329 | 1.62257 | 99.798 |…
705 …+ amd-pstate-schedutil | 2 | 166 | 1.49761 | 99.9993 |…
707 …+ amd-pstate-schedutil | 3 | 166 | 1.47806 | 99.9993 |…
709 …+ amd-pstate-schedutil | Average | 165.776 | 1.53275 | 99.9322 |…
729 …+ amd-pstate-ondemand VS amd-pstate-schedutil | Comprison(%) | | | |…
731 …+ acpi-cpufreq-ondemand VS amd-pstate-ondemand | Comprison(%) | | | |…
733 …+ acpi-cpufreq-schedutil VS amd-pstate-schedutil | Comprison(%) | | | |…
748 …+ amd-pstate-ondemand | 1 | 50.119 | 2.10509 | 23.3076 …
750 …+ amd-pstate-ondemand | 2 | 94.8006 | 1.98771 | 56.6533 …
752 …+ amd-pstate-ondemand | 3 | 76.6091 | 2.53251 | 43.7791 …
754 …+ amd-pstate-ondemand | Average | 73.8429 | 2.20844 | 41.2467 …
756 …+ amd-pstate-schedutil | 1 | 165.919 | 1.62319 | 98.3868 …
758 …+ amd-pstate-schedutil | 2 | 165.97 | 1.31309 | 99.5712 …
760 …+ amd-pstate-schedutil | 3 | 165.973 | 1.28448 | 99.9252 …
762 …+ amd-pstate-schedutil | Average | 165.954 | 1.40692 | 99.2944 …
782 …+ amd-pstate-ondemand VS amd-pstate-schedutil | Comprison(%) | 124.7392 | -36.2934 | 140.7329 …
784 …+ acpi-cpufreq-ondemand VS amd-pstate-ondemand | Comprison(%) | | | …
786 …+ acpi-cpufreq-schedutil VS amd-pstate-schedutil | Comprison(%) | | | …
793 https://www.amd.com/system/files/TechDocs/24593.pdf
798 .. [3] Processor Programming Reference (PPR) for AMD Family 19h Model 51h, Revision A1 Processors
799 https://www.amd.com/system/files/TechDocs/56569-A1-PUB.zip