lkml.org 
[lkml]   [2020]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 1/4] cpufreq: stats: Defer stats update to cpufreq_stats_record_transition()
On 25-09-20, 12:04, Rafael J. Wysocki wrote:
> I'm actually wondering if reset_time is necessary at all.
>
> If cpufreq_stats_record_transition() is the only updater of the stats,
> which will be the case after applying this series IIUC, it may as well
> simply set the new starting point and discard all of the data
> collected so far if reset_pending is set.
>
> IOW, the time when the reset has been requested isn't particularly
> relevant IMV (and it is not exact anyway), because the user is
> basically asking for discarding "history" and that may very well be
> interpreted to include the current sample.

There are times when this would be visible to userspace and won't look nice.

Like, set governor to performance, reset the stats and after 10 seconds, read
the stats again, everything will be 0. Because cpufreq_stats_record_transition()
doesn't get called at all here, we would never clear them until the time
governor is changed and so we need to keep a track of reset-time.

--
viresh

\
 
 \ /
  Last update: 2020-09-25 12:59    [W:0.057 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site