News: 0001487842

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

AMD Developing New Heterogeneous CPU Core Driver For Linux Systems

([AMD] 4 Hours Ago AMD Heterogeneous Core Driver)


AMD for months has already been working on [1]heterogeneous core topology optimizations for Linux within the AMD P-State CPUFreq driver and [2]other heterogeneous CPU topology improvements for dealing with Ryzen systems sporting a mix of "classic" (full) cores with the denser "C" cores. Today though they've announced a brand new "Heterogeneous Core Driver" for further enhancing Linux support for AMD platforms sporting a combination of core types.

The AMD Heterogeneous Core Driver makes use of the Hardware Feedback Interface to provide for more detailed knowledge to the kernel about the core performance/power capabilities to help better with deciding where a thread (task) should be placed. Intel similarly makes use of the [3]Hardware Feedback Interface (HFI) as part of their P vs. E core handling on Linux.

With today's first patch series presenting this open-source AMD Heterogeneous Core Driver for Linux, the patch cover letter explains:

"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 allows the scheduler to select the best core while threads are classified into the specified workload class. The cores ranking table is provided with PCCT subspace type 4 shared memory, which includes the memory base address and length."

[4]This patch series has the initial ~860 lines of code making up this AMD HFI driver. A healthy chunk of that is the new [5]documentation that explains the classic and dense cores, the amd_hfi driver handling, and how the thread classification and ranking is carried out.

As part of this driver is adding a new X86_FEATURE_WORKLOAD_CLASS "workload classification" feature bit. This is used for indicating workload-based heuristic feedback to the operating system for scheduling decisions.

This new "AMD_HFI" driver is now undergoing code review. Given the Linux v6.12 merge window is opening up in just a few weeks, it's unlikely the driver will be deemed reviewed, tested, and ready for merging by then. Thus at the earliest we're likely looking at the driver potentially being ready for Linux v6.13 that in turn will reach a stable release in early 2025. I'll be running some benchmarks on my side with these new AMD heterogeneous core driver patches to see if they help further enhance the likes of [6]Strix Point on Linux.

Separately, a different [7]patch series was posted on Monday for tuning the AMD Preferred Core detection in the AMD P-State driver. The initial AMD Preferred Core support for Linux systems was [8]merged back in Linux 6.9 and now being further refined so that it's more reliable and robust.



[1] https://www.phoronix.com/news/Ryzen-AI-Heterogeneous-Core-Top

[2] https://www.phoronix.com/news/AMD-Heterogeneous-Linux-6.5

[3] https://www.phoronix.com/search/Hardware+Feedback+Interface

[4] https://lore.kernel.org/platform-driver-x86/cover.1724748733.git.perry.yuan@amd.com/

[5] https://lore.kernel.org/platform-driver-x86/c4c66679fc6f8432c0402c8def2dc1b09eaa812d.1724748733.git.perry.yuan@amd.com/

[6] https://www.phoronix.com/search/Strix+Point

[7] https://lore.kernel.org/linux-pm/20240826211358.2694603-1-superm1@kernel.org/

[8] https://www.phoronix.com/news/Linux-6.9-rc1-Released



pWe00Iri3e7Z9lHOX2Qx

Anux

Jumbotron

Anux

Q: How can I choose what groups to post in? ...
Q: How about an example?

A: Ok. Let's say you want to report that Gretzky has been traded from the
Oilers to the Kings. Now right away you might think rec.sport.hockey
would be enough. WRONG. Many more people might be interested. This is a
big trade! Since it's a NEWS article, it belongs in the news.* hierarchy
as well. If you are a news admin, or there is one on your machine, try
news.admin. If not, use news.misc.

The Oilers are probably interested in geology, so try sci.physics. He is
a big star, so post to sci.astro, and sci.space because they are also
interested in stars. Next, his name is Polish sounding. So post to
soc.culture.polish. But that group doesn't exist, so cross-post to
news.groups suggesting it should be created. With this many groups of
interest, your article will be quite bizarre, so post to talk.bizarre as
well. (And post to comp.std.mumps, since they hardly get any articles
there, and a "comp" group will propagate your article further.)

You may also find it is more fun to post the article once in each group.
If you list all the newsgroups in the same article, some newsreaders will
only show the article to the reader once! Don't tolerate this.
-- Brad Templeton, _Emily Postnews Answers Your Questions on Netiquette_