lkml.org 
[lkml]   [2020]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpufreq: stats: Switch to ktime and msec instead of jiffies and usertime
On 10-11-20, 13:53, Thomas Renninger wrote:
> Am Dienstag, 10. November 2020, 12:07:37 CET schrieb Viresh Kumar:
> > The cpufreq and thermal core, both provide sysfs statistics to help
> > userspace learn about the behavior of frequencies and cooling states.
> >
> > This is how they look:
> > /sys/devices/system/cpu/cpufreq/policy0/stats/time_in_state:1200000 399
>
> > The results look like this after this commit:
> > /sys/devices/system/cpu/cpufreq/policy0/stats/time_in_state:1200000 3830
>
> How would userspace know whether it's ms or 10ms?
>
> whatabout a new file with the same convention as cooling devices (adding ms):

Keeping two files for same stuff is not great, and renaming the file
breaks userspace ABI. I am not sure what's the right thing to do here.

> > /sys/class/thermal/cooling_device0/stats/time_in_state_ms:state0 3888
> > /sys/devices/system/cpu/cpufreq/policy0/stats/time_in_state_ms:1200000 3830
>
> Somewhat off-topic, some ideas:
>
> I wonder how useful these stats still are.
> CPU_FREQ_STAT is off on my system:

I still use it.

> config CPU_FREQ_STAT
> bool "CPU frequency transition statistics"
> help
> Export CPU frequency statistics information through sysfs.
>
> If in doubt, say N.
>
> Iirc this was a module at former times?
>
> commit 1aefc75b2449eb68a6fc3ca932e2a4ee353b748d
> Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Date: Tue May 31 22:14:44 2016 +0200
>
> cpufreq: stats: Make the stats code non-modular
>
> outlined 2 problems with cpufreq_stats being non-modular, but
> also seem to fix them up:
> ... and drop the notifiers from it
> Make the stats sysfs attributes appear empty if fast frequency
> switching is enabled...

I already fixed this recently and stats don't appear empty for fast
switch anymore.

--
viresh

\
 
 \ /
  Last update: 2020-11-11 06:14    [W:1.680 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site