sched/nohz: Rewrite and fix load-avg computation -- again
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 22 Jun 2012 13:52:09 +0000 (15:52 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 5 Jul 2012 18:58:13 +0000 (20:58 +0200)
commit5167e8d5417bf5c322a703d2927daec727ea40dd
treeb919aac933c104e7c7abc1730da810f60ba3229d
parent164c33c6adee609b8b9062cce4c10f764d0dce13
sched/nohz: Rewrite and fix load-avg computation -- again

Thanks to Charles Wang for spotting the defects in the current code:

 - If we go idle during the sample window -- after sampling, we get a
   negative bias because we can negate our own sample.

 - If we wake up during the sample window we get a positive bias
   because we push the sample to a known active period.

So rewrite the entire nohz load-avg muck once again, now adding
copious documentation to the code.

Reported-and-tested-by: Doug Smythies <dsmythies@telus.net>
Reported-and-tested-by: Charles Wang <muming.wq@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@kernel.org
Link: http://lkml.kernel.org/r/1340373782.18025.74.camel@twins
[ minor edits ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/sched.h
kernel/sched/core.c
kernel/sched/idle_task.c
kernel/sched/sched.h
kernel/time/tick-sched.c