[PATCH 0/3] Add Zhaoxin preferred core support in acpi-cpufreq

From: Tony W Wang-oc
Date: Thu Dec 28 2023 - 02:57:33 EST


For Zhaoxin CPUs, the cores' highest frequencies may be different, which
means that cores may run at different max frequencies,

According to ACPI-spec6 chapter 8.4.7, the per-core highest frequency
value can be obtained via cppc.

The core with the higher frequency have better performance, which can be
called as preferred core. And better performance can be achieved by
making the scheduler to run tasks on these preferred cores.

The cpufreq driver can use the highest frequency value as the prioriy of
core to make the scheduler try to get better performace.

More specifically:
Add cppc_get_highest_perf function in CPPC driver.
Export two funcions which will be used in acpi-cpufreq drvier.
In the acpi-cpufreq driver use cppc_get_highest_perf() to get highest
frequency value of each core, use sched_set_itmt_core_prio() to set
highest frequency value as core priority, and use sched_set_itmt_support()
provided by ITMT to tell the scheduler to favor on the preferred cores.

Tony W Wang-oc (3):
ACPI: CPPC: Add get the highest perf register value support
x86/sched/itmt: Export two API symbols
ACPI: cpufreq: Add ITMT support when CPPC enabled for Zhaoxin CPUs

arch/x86/kernel/itmt.c | 2 ++
drivers/acpi/cppc_acpi.c | 13 ++++++++
drivers/cpufreq/acpi-cpufreq.c | 56 +++++++++++++++++++++++++++++++++-
include/acpi/cppc_acpi.h | 5 +++
4 files changed, 75 insertions(+), 1 deletion(-)

--
2.25.1