lkml.org 
[lkml]   [2012]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] sched: Folding nohz load accounting more accurate
Date
>> 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.

[unhandled content-type:image/png]
\
 
 \ /
  Last update: 2012-06-19 18:41    [W:0.518 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site