diff options
| author | Meng Li <[email protected]> | 2024-01-19 17:04:58 +0800 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2024-01-31 14:54:50 +0100 |
| commit | f3a052391822b772b4e27f2594526cf1eb103cab (patch) | |
| tree | 4cf8b969d070c1ad8f5772d8dc23ba09a1d40df6 /include/linux | |
| parent | 12753d71e8c5c3e716cedba23ddeed508da0bdc4 (diff) | |
cpufreq: amd-pstate: Enable amd-pstate preferred core support
amd-pstate driver utilizes the functions and data structures
provided by the ITMT architecture to enable the scheduler to
favor scheduling on cores which can be get a higher frequency
with lower voltage. We call it amd-pstate preferrred core.
Here sched_set_itmt_core_prio() is called to set priorities and
sched_set_itmt_support() is called to enable ITMT feature.
amd-pstate driver uses the highest performance value to indicate
the priority of CPU. The higher value has a higher priority.
The initial core rankings are set up by amd-pstate when the
system boots.
Add a variable hw_prefcore in cpudata structure. It will check
if the processor and power firmware support preferred core
feature.
Add one new early parameter `disable` to allow user to disable
the preferred core.
Only when hardware supports preferred core and user set `enabled`
in early parameter, amd pstate driver supports preferred core featue.
Tested-by: Oleksandr Natalenko <[email protected]>
Reviewed-by: Huang Rui <[email protected]>
Reviewed-by: Wyes Karny <[email protected]>
Reviewed-by: Mario Limonciello <[email protected]>
Co-developed-by: Perry Yuan <[email protected]>
Signed-off-by: Perry Yuan <[email protected]>
Signed-off-by: Meng Li <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/amd-pstate.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h index 6ad02ad9c7b4..68fc1bd8d851 100644 --- a/include/linux/amd-pstate.h +++ b/include/linux/amd-pstate.h @@ -52,6 +52,9 @@ struct amd_aperf_mperf { * @prev: Last Aperf/Mperf/tsc count value read from register * @freq: current cpu frequency value * @boost_supported: check whether the Processor or SBIOS supports boost mode + * @hw_prefcore: check whether HW supports preferred core featue. + * Only when hw_prefcore and early prefcore param are true, + * AMD P-State driver supports preferred core featue. * @epp_policy: Last saved policy used to set energy-performance preference * @epp_cached: Cached CPPC energy-performance preference value * @policy: Cpufreq policy value @@ -85,6 +88,7 @@ struct amd_cpudata { u64 freq; bool boost_supported; + bool hw_prefcore; /* EPP feature related attributes*/ s16 epp_policy; |