cpupower: Remove incorrect EPP dependency in get_latency()
PATCH 1/1 cpupower: Remove incorrect EPP dependency in get_latency()
The get_latency() function incorrectly called get_epp() and returned error if EPP (Energy Performance Preference) was not available, even though transition latency and EPP are completely independent CPU frequency features.
--- tools/power/cpupower/utils/cpufreq-info.c | 3 --- 1 file changed, 3 deletions(-)
tools/power/cpupower/utils/cpufreq-info.c +0 -3
@@ -459,9 +459,6 @@ 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" ));
Signature · 1 line
2.34.1
Shuah Khan
maintainerQuoted 4 lines · Kaushlendra Kumar
The
get_latency()function incorrectly calledget_epp()and returned error if EPP (Energy Performance Preference) was not available, even though transition latency and EPP are completely independent CPU frequency features.
How did you find this problem? Are EPP and CPU frequency features independent on non-intel platforms?
Quoted 11 lines
Signed-off-by Kaushlendra Kumar <[email protected]>--- tools/power/cpupower/utils/cpufreq-info.c | 3 --- 1 file changed, 3 deletions(-)tools/power/cpupower/utils/cpufreq-info.c +0
-0
tools/power/cpupower/utils/cpufreq-info.c static int get_latency(unsigned int cpu, unsigned int human) · line 464
Quoted 9 lines
tools/power/cpupower/utils/cpufreq-info.c +0
-3@@ -459,9 +459,6 @@ 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" ));
thanks,
-- Shuah
Quoted 8 lines · Shuah Khan
Quoted 4 lines · Kaushlendra Kumar
The
get_latency()function incorrectly calledget_epp()and returned error if EPP (Energy Performance Preference) was not available, even though transition latency and EPP are completely independent CPU frequency features.How did you find this problem? Are EPP and CPU frequency features independent on non-intel platforms?
Hi Shuah,
Why do we need to call get_epp() after capturing the latency?
The erroneous get_epp() check can cause get_latency() to fail, even though valid latency information is available.
Thanks,
Kaushlendra
Shuah Khan
maintainerQuoted 7 lines · Kaushlendra
Quoted 6 lines · Shuah Khan
Quoted 4 lines · Kaushlendra Kumar
The
get_latency()function incorrectly calledget_epp()and returned error if EPP (Energy Performance Preference) was not available, even though transition latency and EPP are completely independent CPU frequency features.
Quoted 8 lines
Quoted 2 lines
How did you find this problem? Are EPP and CPU frequency features independent on non-intel platforms?
Hi Shuah,
Why do we need to call
get_epp()after capturing the latency?The erroneous
get_epp()check can causeget_latency()to fail, even though valid latency information is available.
You didn't answer my second question about non-intel platforms?
thanks,
-- Shuah
Quoted 11 lines · Shuah Khan
Quoted 10 lines · Kaushlendra
Quoted 8 lines · Shuah Khan
Quoted 4 lines · Kaushlendra Kumar
The
get_latency()function incorrectly calledget_epp()and returned error if EPP (Energy Performance Preference) was not available, even though transition latency and EPP are completely independent CPU frequency features.How did you find this problem? Are EPP and CPU frequency features independent on non-intel platforms?
Quoted 7 lines
Quoted 5 lines
Hi Shuah,
Why do we need to call
get_epp()after capturing the latency?The erroneous
get_epp()check can causeget_latency()to fail, even though valid latency information is available.You didn't answer my second question about non-intel platforms?
Hi Shuah,
EPP (Energy Performance Preference) is Intel-specific and part of Intel's Hardware P-States. So, on non intel platforms these are not related.
BR,
Kaushlendra
Quoted 17 lines · Kaushlendra
Quoted 15 lines · Shuah Khan
Quoted 14 lines · Kaushlendra
Quoted 8 lines · Shuah Khan
Quoted 4 lines · Kaushlendra Kumar
The
get_latency()function incorrectly calledget_epp()and returned error if EPP (Energy Performance Preference) was not available, even though transition latency and EPP are completely independent CPU frequency features.How did you find this problem? Are EPP and CPU frequency features independent on non-intel platforms?
Hi Shuah,
Why do we need to call
get_epp()after capturing the latency?
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
The erroneous
get_epp()check can causeget_latency()to fail, even though valid latency information is available.You didn't answer my second question about non-intel platforms?
Hi Shuah,
EPP (Energy Performance Preference) is Intel-specific and part of Intel's Hardware P-States.
That's not actually correct, EPP is part of ACPI CPPC now and amd-pstate uses it. cppc_cpufreq uses it too IIRC.
Quoted 1 line
So, on non intel platforms these are not related.
Please double check.
Quoted 24 lines · Rafael J. Wysocki
Quoted 23 lines · Kaushlendra
Quoted 11 lines · Shuah Khan
Quoted 10 lines · Kaushlendra
Quoted 8 lines · Shuah Khan
Quoted 4 lines · Kaushlendra Kumar
The
get_latency()function incorrectly calledget_epp()and returned error if EPP (Energy Performance Preference) was not available, even though transition latency and EPP are completely independent CPU frequency features.How did you find this problem? Are EPP and CPU frequency features independent on non-intel platforms?
Quoted 7 lines
Quoted 5 lines
Hi Shuah,
Why do we need to call
get_epp()after capturing the latency?The erroneous
get_epp()check can causeget_latency()to fail, even though valid latency information is available.You didn't answer my second question about non-intel platforms?
Hi Shuah,
Quoted 7 lines
Quoted 1 line
EPP (Energy Performance Preference) is Intel-specific and part of Intel's Hardware P-States.
That's not actually correct, EPP is part of ACPI CPPC now and amd-pstate uses it.
cppc_cpufrequses it too IIRC.Quoted 1 line
So, on non intel platforms these are not related.
Please double check.
Hi Rafael,
Thank you for the correction.
Apology for the confusion. Let me check how EPP and CPU frequency are related on AMD platform.
Kaushlendra