On Monday, June 09, 2014 02:41:12 PM Srivatsa S. Bhat wrote:
On 06/09/2014 02:21 PM, Viresh Kumar wrote:
'copy_prev_load' was recently added by commit: 18b46ab (cpufreq: governor: Be friendly towards latency-sensitive bursty workloads).
It actually is a bit redundant as we also have 'prev_load' which can store any integer value and can be used instead of 'copy_prev_load' by setting it zero.
True load can also turn out to be zero during long idle intervals (and hence the actual value of 'prev_load' and the overloaded value can clash). However this is not a problem because, if the true load was really zero in the previous interval, it makes sense to evaluate the load afresh for the current interval rather than copying the previous load.
So, drop 'copy_prev_load' and use 'prev_load' instead.
Update comments as well to make it more clear.
There is another change here which was probably missed by Srivatsa during the last version of updates he made. The unlikely in the 'if' statement was covering only half of the condition and the whole line should actually come under it.
Also checkpatch is made more silent as it was reporting this (--strict option):
CHECK: Alignment should match open parenthesis
if (unlikely(wall_time > (2 * sampling_rate) &&
j_cdbs->prev_load)) {
Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
Resend: Updated comments/logs as suggested by Srivatsa.
Looks good!
Reviewed-by: Srivatsa S. Bhat srivatsa.bhat@linux.vnet.ibm.com
Applied to bleeding-edge, thanks!