lkml.org 
[lkml]   [2023]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] tools/power turbostat: Fix Bzy_MHz calculation equation
From
Ping

On 2023/10/7 13:46, Peng Liu wrote:
> From: Peng Liu <liupeng17@lenovo.com>
>
> To calculate Bzy_MHz, TSC_delta should multiply APERF_delta instead
> of dividing it.
>
> Signed-off-by: Peng Liu <liupeng17@lenovo.com>
> ---
> tools/power/x86/turbostat/turbostat.8 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/power/x86/turbostat/turbostat.8 b/tools/power/x86/turbostat/turbostat.8
> index 8f08c3fd498d..1ba6340d3b3d 100644
> --- a/tools/power/x86/turbostat/turbostat.8
> +++ b/tools/power/x86/turbostat/turbostat.8
> @@ -370,7 +370,7 @@ below the processor's base frequency.
>
> Busy% = MPERF_delta/TSC_delta
>
> -Bzy_MHz = TSC_delta/APERF_delta/MPERF_delta/measurement_interval
> +Bzy_MHz = TSC_delta*APERF_delta/MPERF_delta/measurement_interval
>
> Note that these calculations depend on TSC_delta, so they
> are not reliable during intervals when TSC_MHz is not running at the base frequency.

\
 
 \ /
  Last update: 2023-10-30 04:13    [W:0.067 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site