Skip to content

Commit 3a004e1

Browse files
Meng Lirafaeljw
authored andcommitted
Documentation: amd-pstate: introduce amd-pstate preferred core
Introduce amd-pstate preferred core. check preferred core state set by the kernel parameter: $ cat /sys/devices/system/cpu/amd-pstate/prefcore Tested-by: Oleksandr Natalenko <[email protected]> Reviewed-by: Wyes Karny <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Perry Yuan <[email protected]> Signed-off-by: Meng Li <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent e571a5e commit 3a004e1

File tree

1 file changed

+57
-2
lines changed

1 file changed

+57
-2
lines changed

Documentation/admin-guide/pm/amd-pstate.rst

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ platforms. The AMD P-States mechanism is the more performance and energy
300300
efficiency frequency management method on AMD processors.
301301

302302

303-
AMD Pstate Driver Operation Modes
304-
=================================
303+
``amd-pstate`` Driver Operation Modes
304+
======================================
305305

306306
``amd_pstate`` CPPC has 3 operation modes: autonomous (active) mode,
307307
non-autonomous (passive) mode and guided autonomous (guided) mode.
@@ -353,6 +353,48 @@ is activated. In this mode, driver requests minimum and maximum performance
353353
level and the platform autonomously selects a performance level in this range
354354
and appropriate to the current workload.
355355

356+
``amd-pstate`` Preferred Core
357+
=================================
358+
359+
The core frequency is subjected to the process variation in semiconductors.
360+
Not all cores are able to reach the maximum frequency respecting the
361+
infrastructure limits. Consequently, AMD has redefined the concept of
362+
maximum frequency of a part. This means that a fraction of cores can reach
363+
maximum frequency. To find the best process scheduling policy for a given
364+
scenario, OS needs to know the core ordering informed by the platform through
365+
highest performance capability register of the CPPC interface.
366+
367+
``amd-pstate`` preferred core enables the scheduler to prefer scheduling on
368+
cores that can achieve a higher frequency with lower voltage. The preferred
369+
core rankings can dynamically change based on the workload, platform conditions,
370+
thermals and ageing.
371+
372+
The priority metric will be initialized by the ``amd-pstate`` driver. The ``amd-pstate``
373+
driver will also determine whether or not ``amd-pstate`` preferred core is
374+
supported by the platform.
375+
376+
``amd-pstate`` driver will provide an initial core ordering when the system boots.
377+
The platform uses the CPPC interfaces to communicate the core ranking to the
378+
operating system and scheduler to make sure that OS is choosing the cores
379+
with highest performance firstly for scheduling the process. When ``amd-pstate``
380+
driver receives a message with the highest performance change, it will
381+
update the core ranking and set the cpu's priority.
382+
383+
``amd-pstate`` Preferred Core Switch
384+
=================================
385+
Kernel Parameters
386+
-----------------
387+
388+
``amd-pstate`` peferred core`` has two states: enable and disable.
389+
Enable/disable states can be chosen by different kernel parameters.
390+
Default enable ``amd-pstate`` preferred core.
391+
392+
``amd_prefcore=disable``
393+
394+
For systems that support ``amd-pstate`` preferred core, the core rankings will
395+
always be advertised by the platform. But OS can choose to ignore that via the
396+
kernel parameter ``amd_prefcore=disable``.
397+
356398
User Space Interface in ``sysfs`` - General
357399
===========================================
358400

@@ -385,6 +427,19 @@ control its functionality at the system level. They are located in the
385427
to the operation mode represented by that string - or to be
386428
unregistered in the "disable" case.
387429

430+
``prefcore``
431+
Preferred core state of the driver: "enabled" or "disabled".
432+
433+
"enabled"
434+
Enable the ``amd-pstate`` preferred core.
435+
436+
"disabled"
437+
Disable the ``amd-pstate`` preferred core
438+
439+
440+
This attribute is read-only to check the state of preferred core set
441+
by the kernel parameter.
442+
388443
``cpupower`` tool support for ``amd-pstate``
389444
===============================================
390445

0 commit comments

Comments
 (0)