[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5b0996d-be80-47a9-af28-ee9776638ab7@linuxfoundation.org>
Date: Mon, 9 Dec 2024 17:43:33 -0700
From: Shuah Khan <skhan@...uxfoundation.org>
To: He Rongguang <herongguang@...ux.alibaba.com>, trenn@...e.com,
shuah@...nel.org, jwyatt@...hat.com, jkacur@...hat.com, wyes.karny@....com
Cc: linux-kernel@...r.kernel.org, shannon.zhao@...ux.alibaba.com,
linux-pm@...r.kernel.org, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] cpupower: fix TSC MHz calculation for Mperf monitor
On 11/28/24 02:50, He Rongguang wrote:
> Commit 'cpupower: Make TSC read per CPU for Mperf monitor' (c2adb1877b7)
> changes TSC counter reads to per cpu, but left time diff global (from
> start of all cpus to end of all cpus), thus diff(time) is too large for
> a cpu's tsc counting, resulting in far less than acutal TSC_Mhz and thus
> `cpupower monitor` showing far less than actual cpu realtime frequency.
>
> Fix this by making timediff also per cpu.
>
> /proc/cpuinfo shows frequency:
> cat /proc/cpuinfo | egrep -e 'processor' -e 'MHz'
> ...
> processor : 171
> cpu MHz : 4108.498
> ...
>
> before fix (System 100% busy):
> | Mperf || Idle_Stats
> CPU| C0 | Cx | Freq || POLL | C1 | C2
> 171| 0.77| 99.23| 2279|| 0.00| 0.00| 0.00
>
> after fix (System 100% busy):
> | Mperf || Idle_Stats
> CPU| C0 | Cx | Freq || POLL | C1 | C2
> 171| 0.46| 99.54| 4095|| 0.00| 0.00| 0.00
>
> Fixes: c2adb1877b76f ("cpupower: Make TSC read per CPU for Mperf monitor")
> Signed-off-by: He Rongguang <herongguang@...ux.alibaba.com>
> ---
This patch has several warnings and seems to corrupt. Can you
look into this and send v2?
scripts/checkpatch.pl will show you the problems.
thanks,
-- Shuah
Powered by blists - more mailing lists