AMD Hardware Feedback Interface "HFI" Patches Updated For The Linux Kernel
([AMD] 5 Hours Ago
AMD HFI v7 For Linux)
- Reference: 0001510841
- News link: https://www.phoronix.com/news/AMD-HFI-v7-Linux
- Source link:
While there are [1]many great new features in Linux 6.13 like the [2]AMD 3D V-Cache Optimizer driver , one of the features that wasn't buttoned up in time for this current kernel cycle were the patches implementing the AMD Hardware Feedback Interface (HFI). But that work remains ongoing and last week brought the seventh iteration of the patches.
For the past several months AMD Linux engineers have been working through [3]the AMD HFI CPU core driver for Linux systems for [4]better handling their heterogeneous CPU core designs with a mix of classic "full" cores and the smaller dense cores focused on power efficiency. They've made various improvements in this area already with prior Linux kernel releases while this HFI functionality should be a nice step forward for such CPUs.
Mario Limonciello of AMD's Linux team explained in the recent [5]v7 patch series this AMD HFI work:
"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 AMD HFI support has been found to increase the Linux performance on AMD heterogeneous CPUs by 2~5% on average across various benchmarks. The downside though to this work is slightly higher process context switching costs.
Once these patches are ready for mainline they will be exposed via the "AMD_HFI" Kconfig build option. There is more background information for those interested via [6]this documentation patch .
[1] https://www.phoronix.com/review/linux-613-features
[2] https://www.phoronix.com/news/Linux-6.13-x86-Platform-Drivers
[3] https://www.phoronix.com/news/AMD-Heterogeneous-Core-Driver
[4] https://www.phoronix.com/news/AMD-HFI-Linux-Driver-v2
[5] https://lore.kernel.org/lkml/20241130140703.557-1-mario.limonciello@amd.com/
[6] https://lore.kernel.org/lkml/20241130140703.557-2-mario.limonciello@amd.com/
For the past several months AMD Linux engineers have been working through [3]the AMD HFI CPU core driver for Linux systems for [4]better handling their heterogeneous CPU core designs with a mix of classic "full" cores and the smaller dense cores focused on power efficiency. They've made various improvements in this area already with prior Linux kernel releases while this HFI functionality should be a nice step forward for such CPUs.
Mario Limonciello of AMD's Linux team explained in the recent [5]v7 patch series this AMD HFI work:
"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 AMD HFI support has been found to increase the Linux performance on AMD heterogeneous CPUs by 2~5% on average across various benchmarks. The downside though to this work is slightly higher process context switching costs.
Once these patches are ready for mainline they will be exposed via the "AMD_HFI" Kconfig build option. There is more background information for those interested via [6]this documentation patch .
[1] https://www.phoronix.com/review/linux-613-features
[2] https://www.phoronix.com/news/Linux-6.13-x86-Platform-Drivers
[3] https://www.phoronix.com/news/AMD-Heterogeneous-Core-Driver
[4] https://www.phoronix.com/news/AMD-HFI-Linux-Driver-v2
[5] https://lore.kernel.org/lkml/20241130140703.557-1-mario.limonciello@amd.com/
[6] https://lore.kernel.org/lkml/20241130140703.557-2-mario.limonciello@amd.com/
phoronix