Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 8157fbc

Browse files
kudureranganathPeter Zijlstra
authored andcommitted
cpufreq/amd-pstate: Update asym_prefer_cpu when core rankings change
A subset of AMD systems supporting Preferred Core rankings can have their rankings changed dynamically at runtime. Update the "sg->asym_prefer_cpu" across the local hierarchy of CPU when the preferred core ranking changes. Signed-off-by: K Prateek Nayak <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 0e3f6c3 commit 8157fbc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,10 @@ static void amd_pstate_update_limits(unsigned int cpu)
844844
if (highest_perf_changed) {
845845
WRITE_ONCE(cpudata->prefcore_ranking, cur_high);
846846

847-
if (cur_high < CPPC_MAX_PERF)
847+
if (cur_high < CPPC_MAX_PERF) {
848848
sched_set_itmt_core_prio((int)cur_high, cpu);
849+
sched_update_asym_prefer_cpu(cpu, prev_high, cur_high);
850+
}
849851
}
850852
}
851853

0 commit comments

Comments
 (0)