lkml.org 
[lkml]   [2010]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched: Avoid side-effect of tickless idle on update_cpu_load (v2)
From
Date
On Mon, 2010-05-17 at 10:52 -0700, Venkatesh Pallipadi wrote:
> > load_i = ((2^i)-1)/(2^i) * load_i + 1/(2^i) * load_(i-1)
> >
> > not
> >
> > load_i = ((2^i)-1)/(2^i) * load_i + 1/(2^i) * cur_load
>
> Hmm. I assumed you meant
> load_(i-1) is same as cur_load when you said
> >> >Where load_-1 == current load.
>
> No? Or did I miss something?

load_(i-1) is only load_-1 when i == 0.

But it seems you're right and I misread the code. update_cpu_load() does
take a copy of this_load for each iteration, initially I thought it used
the load of the last iteration.

> For the updates done every tick, it is
> load = degrade * load + (1-degrade) * cur_load
> For updates done with missed ticks
> load = degrade^(missed-1) * load
> load = degrade * load + (1-degrade) * cur_load
>
> So, cur_load is only accounted for the last tick, and zero load
> assumed for all the missed ticks.

Right.


\
 
 \ /
  Last update: 2010-05-18 17:15    [W:0.087 / U:15.004 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site