>> On Tue, 2012-06-19 at 14:08 +0800, Yong Zhang wrote: > On 2012.06.19 02:19 -0700, Peter Zijlstra wrote: >>> /* >>> + * If we're still outside the sample window, we're done. >>> */ >>> + if (time_before(jiffies, this_rq->calc_load_update)) >>> + return; >> else if (time_before(jiffies, calc_load_update + 10) >> this_rq->calc_load_update = calc_load_update + LOAD_FREQ; >> else >> this_rq->calc_load_update = calc_load_update; >> >> Otherwise if you woke after the sample window, we loose on sample? >> And maybe we need local variable to cache calc_load_update. > Ah indeed, although I'd write it like: > this_rq->calc_load_update = calc_load_update; > if (time_before(jiffies, this_rq->calc_load_update + 10) > this_rq->calc_load_update += LOAD_FREQ; Note missing end brace: if (time_before(jiffies, this_rq->calc_load_update + 10)) My automated 63 hour test has been terminated, the code changed and the test re-started. The attached png file is what I had so far, but it will be replaced. Summary: Looked good, so far.