public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/power turbostat: Fix Bzy_MHz calculation equation
@ 2023-10-07  5:46 Peng Liu
  2023-10-30  3:11 ` Peng Liu
  0 siblings, 1 reply; 7+ messages in thread
From: Peng Liu @ 2023-10-07  5:46 UTC (permalink / raw)
  Cc: lenb, linux-pm, linux-kernel, liupeng17

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.
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/power turbostat: Fix Bzy_MHz calculation equation
  2023-10-07  5:46 [PATCH] tools/power turbostat: Fix Bzy_MHz calculation equation Peng Liu
@ 2023-10-30  3:11 ` Peng Liu
  2023-11-02 15:31   ` Doug Smythies
  0 siblings, 1 reply; 7+ messages in thread
From: Peng Liu @ 2023-10-30  3:11 UTC (permalink / raw)
  To: lenb; +Cc: linux-pm, linux-kernel, liupeng17

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] tools/power turbostat: Fix Bzy_MHz calculation equation
  2023-10-30  3:11 ` Peng Liu
@ 2023-11-02 15:31   ` Doug Smythies
  2023-11-03  1:55     ` Peng Liu
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Doug Smythies @ 2023-11-02 15:31 UTC (permalink / raw)
  To: 'Peng Liu', 'Wyes Karny'
  Cc: linux-pm, linux-kernel, liupeng17, lenb, Doug Smythies

Hi Peng and Wyes,

Just for your information about your recent "ping"s about your turbostat patches:

Please be aware that there is rarely any reply. There tends to be about 2 turbostat updates released per year. Your patches are in patchworks [1], as are some others, including an old one of mine from 2023.04.03
Eventually there will be an update, and hopefully it will include all our patches.

[1] https://patchwork.kernel.org/project/linux-pm/list/?series=&submitter=&state=&q=&archive=&delegate=107

... Doug

On 2023.10.29 08:12 Peng Liu wrote:

> 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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/power turbostat: Fix Bzy_MHz calculation equation
  2023-11-02 15:31   ` Doug Smythies
@ 2023-11-03  1:55     ` Peng Liu
  2023-11-03  4:48     ` Wyes Karny
  2023-11-28  1:39     ` Len Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Peng Liu @ 2023-11-03  1:55 UTC (permalink / raw)
  To: Doug Smythies
  Cc: linux-pm, linux-kernel, liupeng17, lenb, 'Wyes Karny'

Hi Doug,

Thanks for your information. I wonder whether a submitter will be notified if his/her patch is not accepted. Can I assume that my patch is accepted if no reply is received?

Regards,
Peng

On 2023/11/2 23:31, Doug Smythies wrote:
> Hi Peng and Wyes,
>
> Just for your information about your recent "ping"s about your turbostat patches:
>
> Please be aware that there is rarely any reply. There tends to be about 2 turbostat updates released per year. Your patches are in patchworks [1], as are some others, including an old one of mine from 2023.04.03
> Eventually there will be an update, and hopefully it will include all our patches.
>
> [1] https://patchwork.kernel.org/project/linux-pm/list/?series=&submitter=&state=&q=&archive=&delegate=107
>
> ... Doug
>
> On 2023.10.29 08:12 Peng Liu wrote:
>
>> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/power turbostat: Fix Bzy_MHz calculation equation
  2023-11-02 15:31   ` Doug Smythies
  2023-11-03  1:55     ` Peng Liu
@ 2023-11-03  4:48     ` Wyes Karny
  2023-11-28  1:39     ` Len Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Wyes Karny @ 2023-11-03  4:48 UTC (permalink / raw)
  To: Doug Smythies; +Cc: 'Peng Liu', linux-pm, linux-kernel, liupeng17, lenb

On 02 Nov 08:31, Doug Smythies wrote:
> Hi Peng and Wyes,
> 
> Just for your information about your recent "ping"s about your turbostat patches:
> 
> Please be aware that there is rarely any reply. There tends to be about 2 turbostat updates released per year. Your patches are in patchworks [1], as are some others, including an old one of mine from 2023.04.03
> Eventually there will be an update, and hopefully it will include all our patches.

Thanks Doug for the information.

Regards,
Wyes
> 
> [1] https://patchwork.kernel.org/project/linux-pm/list/?series=&submitter=&state=&q=&archive=&delegate=107
> 
> ... Doug
> 
> On 2023.10.29 08:12 Peng Liu wrote:
> 
> > 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.
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/power turbostat: Fix Bzy_MHz calculation equation
  2023-11-02 15:31   ` Doug Smythies
  2023-11-03  1:55     ` Peng Liu
  2023-11-03  4:48     ` Wyes Karny
@ 2023-11-28  1:39     ` Len Brown
  2023-11-29  1:57       ` 回复: [External] " Peng Peng17 Liu
  2 siblings, 1 reply; 7+ messages in thread
From: Len Brown @ 2023-11-28  1:39 UTC (permalink / raw)
  To: Doug Smythies; +Cc: Peng Liu, Wyes Karny, linux-pm, linux-kernel, liupeng17

Peng Liu,
Thanks for the close read of the documentation, and the patch.
I've applied it, though I re-wrote the commit message (below) to make
it clear it is a documentation fix, as the code was already correct.

thanks,
-Len

ps. I would have replied to your original e-mail, but there was a
period where gmail dropped mail due to space limitations.
No worries, as Doug said, everything is in patchwork.


    tools/power turbostat: Fix Bzy_MHz documentation typo

    The code calculates Bzy_MHz by multiplying TSC_delta *
APERF_delta/MPERF_delta
    The man page erroneously showed that TSC_delta was divided.

On Thu, Nov 2, 2023 at 11:31 AM Doug Smythies <dsmythies@telus.net> wrote:
>
> Hi Peng and Wyes,
>
> Just for your information about your recent "ping"s about your turbostat patches:
>
> Please be aware that there is rarely any reply. There tends to be about 2 turbostat updates released per year. Your patches are in patchworks [1], as are some others, including an old one of mine from 2023.04.03
> Eventually there will be an update, and hopefully it will include all our patches.
>
> [1] https://patchwork.kernel.org/project/linux-pm/list/?series=&submitter=&state=&q=&archive=&delegate=107
>
> ... Doug
>
> On 2023.10.29 08:12 Peng Liu wrote:
>
> > 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.
>


-- 
Len Brown, Intel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* 回复: [External] Re: [PATCH] tools/power turbostat: Fix Bzy_MHz calculation equation
  2023-11-28  1:39     ` Len Brown
@ 2023-11-29  1:57       ` Peng Peng17 Liu
  0 siblings, 0 replies; 7+ messages in thread
From: Peng Peng17 Liu @ 2023-11-29  1:57 UTC (permalink / raw)
  To: Len Brown
  Cc: Peng Liu, Wyes Karny, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Doug Smythies

Len,

The new commit message is better. Thanks for your help😊

Regards,
Peng

-----邮件原件-----
发件人: Len Brown <lenb@kernel.org> 
发送时间: 2023年11月28日 9:40
收件人: Doug Smythies <dsmythies@telus.net>
抄送: Peng Liu <pngliu@hotmail.com>; Wyes Karny <wyes.karny@amd.com>; linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; Peng Peng17 Liu <liupeng17@lenovo.com>
主题: [External] Re: [PATCH] tools/power turbostat: Fix Bzy_MHz calculation equation

Peng Liu,
Thanks for the close read of the documentation, and the patch.
I've applied it, though I re-wrote the commit message (below) to make it clear it is a documentation fix, as the code was already correct.

thanks,
-Len

ps. I would have replied to your original e-mail, but there was a period where gmail dropped mail due to space limitations.
No worries, as Doug said, everything is in patchwork.


    tools/power turbostat: Fix Bzy_MHz documentation typo

    The code calculates Bzy_MHz by multiplying TSC_delta * APERF_delta/MPERF_delta
    The man page erroneously showed that TSC_delta was divided.

On Thu, Nov 2, 2023 at 11:31 AM Doug Smythies <dsmythies@telus.net> wrote:
>
> Hi Peng and Wyes,
>
> Just for your information about your recent "ping"s about your turbostat patches:
>
> Please be aware that there is rarely any reply. There tends to be 
> about 2 turbostat updates released per year. Your patches are in patchworks [1], as are some others, including an old one of mine from 2023.04.03 Eventually there will be an update, and hopefully it will include all our patches.
>
> [1] 
> https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc
> hwork.kernel.org%2Fproject%2Flinux-pm%2Flist%2F%3Fseries%3D%26submitte
> r%3D%26state%3D%26q%3D%26archive%3D%26delegate%3D107&data=05%7C01%7Cli
> upeng17%40lenovo.com%7Cb4cd61b01e3b4d8b79ae08dbefb2f521%7C5c7d0b28bdf8
> 410caa934df372b16203%7C0%7C0%7C638367324123743896%7CUnknown%7CTWFpbGZs
> b3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D
> %7C3000%7C%7C%7C&sdata=nsw8vwV2oSAOBVGWTu6PAFeMPhpnZM8AXtzXWpoaRgw%3D&
> reserved=0
>
> ... Doug
>
> On 2023.10.29 08:12 Peng Liu wrote:
>
> > 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.
>


--
Len Brown, Intel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-29  6:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-07  5:46 [PATCH] tools/power turbostat: Fix Bzy_MHz calculation equation Peng Liu
2023-10-30  3:11 ` Peng Liu
2023-11-02 15:31   ` Doug Smythies
2023-11-03  1:55     ` Peng Liu
2023-11-03  4:48     ` Wyes Karny
2023-11-28  1:39     ` Len Brown
2023-11-29  1:57       ` 回复: [External] " Peng Peng17 Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox