Skip to content

Commit

Permalink
cpupower: Don't fetch maximum latency when EPP is enabled
Browse files Browse the repository at this point in the history
When EPP has been enabled the hardware will autonomously change
frequencies on it's own and thus there is no latency with changing
from the kernel.

Avoid doing the maximum latency check when EPP is found. This will
apply to both amd-pstate and intel-pstate drivers.

Link: https://lore.kernel.org/r/20241218191144.3440854-7-superm1@kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
  • Loading branch information
Mario Limonciello authored and Shuah Khan committed Dec 20, 2024
1 parent 5f567af commit acf7126
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/power/cpupower/utils/cpufreq-info.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ static int get_latency(unsigned int cpu, unsigned int human)
{
unsigned long latency = cpufreq_get_transition_latency(cpu);

if (!get_epp(cpu, false))
return -EINVAL;

printf(_(" maximum transition latency: "));
if (!latency || latency == UINT_MAX) {
printf(_(" Cannot determine or is not supported.\n"));
Expand Down

0 comments on commit acf7126

Please sign in to comment.