linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/13] Add support for AMD hardware feedback interface
@ 2024-10-10 19:36 Mario Limonciello
  2024-10-10 19:36 ` [PATCH v2 01/13] Documentation: x86: Add AMD Hardware Feedback Interface documentation Mario Limonciello
                   ` (13 more replies)
  0 siblings, 14 replies; 33+ messages in thread
From: Mario Limonciello @ 2024-10-10 19:36 UTC (permalink / raw)
  To: Borislav Petkov, Hans de Goede, Ilpo Järvinen
  Cc: x86, Gautham R . Shenoy, Mario Limonciello, Perry Yuan,
	linux-kernel, linux-doc, linux-pm, platform-driver-x86,
	Shyam Sundar S K

The AMD Heterogeneous core design and Hardware Feedback Interface (HFI)
provide behavioral classification and a dynamically updated ranking table
for the scheduler to use when choosing cores for tasks.

Threads are classified during runtime into enumerated classes.
Currently, the driver supports 3 classes (0 through 2). These classes
represent thread performance/power characteristics that may benefit from
special scheduling behaviors. The real-time thread classification is
consumed by the operating system and is used to inform the scheduler of
where the thread should be placed for optimal performance or energy efficiency.

The thread classification helps to select CPU from a ranking table that describes
an efficiency and performance ranking for each classification from two dimensions.

The ranking data provided by the ranking table are numbers ranging from 0 to 255,
where a higher performance value indicates higher performance capability and a higher
efficiency value indicates greater efficiency. All the CPU cores are ranked into
different class IDs. Within each class ranking, the cores may have different ranking
values. Therefore, picking from each classification ID will later allow the scheduler
to select the best core while threads are classified into the specified workload class.

This series was originally submitted by Perry Yuan [1] but he is now doing a different
role and he asked me to take over.

Link: https://lore.kernel.org/all/cover.1724748733.git.perry.yuan@amd.com/

On applicable hardware this series has between a 2% and 5% improvement across various
benchmarks.

There is however a cost associated with clearing history on the process context switch.
On average it increases the delay by 119ns, and also has a wider range in delays
(the standard deviation is 25% greater).

Mario Limonciello (3):
  MAINTAINERS: Add maintainer entry for AMD Hardware Feedback Driver
  cpufreq/amd-pstate: Disable preferred cores on designs with workload
    classification
  platform/x86/amd: hfi: Set ITMT priority from ranking data

Perry Yuan (10):
  Documentation: x86: Add AMD Hardware Feedback Interface documentation
  x86/cpufeatures: add X86_FEATURE_WORKLOAD_CLASS feature bit
  x86/msr-index: define AMD heterogeneous CPU related MSR
  platform/x86: hfi: Introduce AMD Hardware Feedback Interface Driver
  platform/x86: hfi: parse CPU core ranking data from shared memory
  platform/x86: hfi: init per-cpu scores for each class
  platform/x86: hfi: add online and offline callback support
  platform/x86: hfi: add power management callback
  x86/cpu: Enable SD_ASYM_PACKING for DIE Domain on AMD Processors
  x86/process: Clear hardware feedback history for AMD processors

 Documentation/arch/x86/amd-hfi.rst    | 116 ++++++
 Documentation/arch/x86/index.rst      |   1 +
 MAINTAINERS                           |   9 +
 arch/x86/include/asm/cpufeatures.h    |   1 +
 arch/x86/include/asm/hreset.h         |   6 +
 arch/x86/include/asm/msr-index.h      |   5 +
 arch/x86/kernel/cpu/common.c          |  15 +
 arch/x86/kernel/cpu/scattered.c       |   1 +
 arch/x86/kernel/process_32.c          |   3 +
 arch/x86/kernel/process_64.c          |   3 +
 arch/x86/kernel/smpboot.c             |   5 +-
 drivers/cpufreq/amd-pstate.c          |   4 +
 drivers/platform/x86/amd/Kconfig      |   1 +
 drivers/platform/x86/amd/Makefile     |   1 +
 drivers/platform/x86/amd/hfi/Kconfig  |  21 +
 drivers/platform/x86/amd/hfi/Makefile |   7 +
 drivers/platform/x86/amd/hfi/hfi.c    | 541 ++++++++++++++++++++++++++
 17 files changed, 738 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/arch/x86/amd-hfi.rst
 create mode 100644 arch/x86/include/asm/hreset.h
 create mode 100644 drivers/platform/x86/amd/hfi/Kconfig
 create mode 100644 drivers/platform/x86/amd/hfi/Makefile
 create mode 100644 drivers/platform/x86/amd/hfi/hfi.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2024-10-18 13:46 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10 19:36 [PATCH v2 00/13] Add support for AMD hardware feedback interface Mario Limonciello
2024-10-10 19:36 ` [PATCH v2 01/13] Documentation: x86: Add AMD Hardware Feedback Interface documentation Mario Limonciello
2024-10-12  3:53   ` Bagas Sanjaya
2024-10-10 19:36 ` [PATCH v2 02/13] MAINTAINERS: Add maintainer entry for AMD Hardware Feedback Driver Mario Limonciello
2024-10-10 19:36 ` [PATCH v2 03/13] x86/cpufeatures: add X86_FEATURE_WORKLOAD_CLASS feature bit Mario Limonciello
2024-10-10 19:36 ` [PATCH v2 04/13] x86/msr-index: define AMD heterogeneous CPU related MSR Mario Limonciello
2024-10-10 19:36 ` [PATCH v2 05/13] platform/x86: hfi: Introduce AMD Hardware Feedback Interface Driver Mario Limonciello
2024-10-14  9:10   ` Ilpo Järvinen
2024-10-14 19:46     ` Mario Limonciello
2024-10-14  9:20   ` Ilpo Järvinen
2024-10-15  3:52   ` Ricardo Neri
2024-10-15 18:09     ` Mario Limonciello
2024-10-17 23:33       ` Ricardo Neri
2024-10-18 13:46         ` Mario Limonciello
2024-10-16  9:36   ` Uwe Kleine-König
2024-10-16  9:59     ` Hans de Goede
2024-10-16 16:06       ` Mario Limonciello
2024-10-10 19:36 ` [PATCH v2 06/13] platform/x86: hfi: parse CPU core ranking data from shared memory Mario Limonciello
2024-10-14 10:14   ` Ilpo Järvinen
2024-10-14 20:09     ` Mario Limonciello
2024-10-10 19:36 ` [PATCH v2 07/13] platform/x86: hfi: init per-cpu scores for each class Mario Limonciello
2024-10-14 10:15   ` Ilpo Järvinen
2024-10-10 19:37 ` [PATCH v2 08/13] platform/x86: hfi: add online and offline callback support Mario Limonciello
2024-10-14 10:27   ` Ilpo Järvinen
2024-10-10 19:37 ` [PATCH v2 09/13] platform/x86: hfi: add power management callback Mario Limonciello
2024-10-14 10:29   ` Ilpo Järvinen
2024-10-10 19:37 ` [PATCH v2 10/13] x86/cpu: Enable SD_ASYM_PACKING for DIE Domain on AMD Processors Mario Limonciello
2024-10-10 19:37 ` [PATCH v2 11/13] x86/process: Clear hardware feedback history for AMD processors Mario Limonciello
2024-10-10 19:37 ` [PATCH v2 12/13] cpufreq/amd-pstate: Disable preferred cores on designs with workload classification Mario Limonciello
2024-10-10 19:37 ` [PATCH v2 13/13] platform/x86/amd: hfi: Set ITMT priority from ranking data Mario Limonciello
2024-10-11  0:54 ` [PATCH v2 00/13] Add support for AMD hardware feedback interface Bagas Sanjaya
2024-10-11  1:29   ` Mario Limonciello
2024-10-12  2:21     ` Bagas Sanjaya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).