Re: [RFC][PATCH] cpufreq: governor: Change the calculation of load for deferred updates

From: Viresh Kumar
Date: Thu Nov 17 2016 - 22:23:50 EST


On 17-11-16, 21:54, Stratos Karafotis wrote:
> Commit 18b46abd0009 ("cpufreq: governor: Be friendly towards latency-
> sensitive bursty workloads"), introduced a method to copy the calculated
> load from the previous sampling period in case of a deferred timer
> (update).
>
> This helps on bursty workloads but generally coping the load for the
> previous measurement could be arbitrary, because of the possibly different
> nature of the new workload.
>
> Instead of coping the load from the previous period we can calculate the
> load considering that between the two samples, the busy time is comparable
> to one sampling period. Thus:
>
> busy = time_elapsed - idle_time
>
> and
>
> load = 100 * busy / sampling_rate;
>
> Also, remove the 'unlikely' hint because it seems that a deferred update
> is a very common case on most modern systems.

You have any numbers to prove that this improves something ?

--
viresh