Re: [PATCH] sched: Folding nohz load accounting more accurate

From: Peter Zijlstra
Date: Tue Jun 12 2012 - 05:56:22 EST


Also added Doug to CC, hopefully we now have everybody who pokes at this
stuff.

On Tue, 2012-06-12 at 17:34 +0800, Charles Wang wrote:
> consider following case:
>
> 5HZ+1
> | cpu0_load cpu1 cpu2 cpu3 calc_load_tasks
> | 1 1 1 1
> | -->calc_load 1
> | 1 1 1 1
> | -->calc_load 2
> | 0 0 1 0
> | -->calc_load 2+1-3=1

Not sure but last time I did the math 2+1-3 ended up being 0.

> | 1 1 0 1
> | -->calc_load 1-1=0
> V
> 5HZ+11 -->calc_global_load 0
>
> actually the load should be around 3, but shows nearly 0.
>
> 1 tick is much long for some workloads.

Yes, one tick is long for some stuff, but seeing we sample once every 5
seconds a little fuzz around sampling the nr_running+nr_uninterruptible
thing shouldn't be too bad.

But I think I see what you're getting at.. lemme get more tea and ponder
this a bit.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/