Being merged back in the Linux 6.9 kernel was AMD Preferred Core support within the amd_pstate driver for being able to communicate the “preferred” cores to the kernel for those that are able to reach a higher maximum frequency or otherwise be preferred over other CPU cores. For the upcoming Linux 6.14 merge window, an important set of patches are queued up for better positioning this Preferred Core handling.
With Linux 6.14, the Linux kernel will be able to support dynamic preferred core rankings. The existing Linux kernel code around ITMT (Intel Turbo Boost Max Tech) code that is leveraged by AMD, the core rankings are treated as static. But with AMD Preferred Core the preferred core rankings can change dynamically at run-time. Thus a set of patches have been worked on by AMD in recent months for allowing the rankings to be dynamically updated within the kernel.
The patch series working on this dynamic core ranking explains:
“The ITMT infrastructure currently assumes ITMT rankings to be static and is set correctly prior to enabling ITMT support which allows the CPU with the highest core ranking to be cached as the “asym_prefer_cpu” in the sched_group struct. However, with the introduction of Preferred Core support in amd-pstate, these rankings can change at runtime.
…
On AMD processors supporting dynamic preferred core ranking, the asym_prefer_cpu cached in sched_group can change dynamically. Since asym_prefer_cpu is cached when the sched domain hierarchy is built, updating the cached value across the system would require rebuilding the sched domain which is prohibitively expensive.All the asym_prefer_cpu comparisons in the load balancing path are only carried out post the sched group stats have been updated after iterating all the CPUs in the group. Uncache the asym_prefer_cpu and compute it while sched group statistics are being updated as a part of sg_lb_stats.
Fixes: f3a052391822 (“cpufreq: amd-pstate: Enable amd-pstate preferred core support”)”
These patches were queued up this week as part of the tip/tip.git’s sched/core branch.
With the AMD patches now making their way to “sched/core” ahead of the Linux 6.14 kernel merge window opening as soon as next week, you can look forward to these patches in the next version of the Linux kernel if all goes well.