]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sched: Cure more NO_HZ load average woes
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 30 Nov 2010 18:48:45 +0000 (19:48 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 7 Jan 2011 21:58:31 +0000 (13:58 -0800)
commit2ebd26f64ae7c6f86277b0cffb7a38cddabfed2f
treed1cf9663f63bffac2a40b9d036fd3a60b11f485d
parent4f7b9db5e1714319211bfdd1c31f38e6e536aa2a
sched: Cure more NO_HZ load average woes

commit 0f004f5a696a9434b7214d0d3cbd0525ee77d428 upstream.

There's a long-running regression that proved difficult to fix and
which is hitting certain people and is rather annoying in its effects.

Damien reported that after 74f5187ac8 (sched: Cure load average vs
NO_HZ woes) his load average is unnaturally high, he also noted that
even with that patch reverted the load avgerage numbers are not
correct.

The problem is that the previous patch only solved half the NO_HZ
problem, it addressed the part of going into NO_HZ mode, not of
comming out of NO_HZ mode. This patch implements that missing half.

When comming out of NO_HZ mode there are two important things to take
care of:

 - Folding the pending idle delta into the global active count.
 - Correctly aging the averages for the idle-duration.

So with this patch the NO_HZ interaction should be complete and
behaviour between CONFIG_NO_HZ=[yn] should be equivalent.

Furthermore, this patch slightly changes the load average computation
by adding a rounding term to the fixed point multiplication.

Reported-by: Damien Wyart <damien.wyart@free.fr>
Reported-by: Tim McGrath <tmhikaru@gmail.com>
Tested-by: Damien Wyart <damien.wyart@free.fr>
Tested-by: Orion Poplawski <orion@cora.nwra.com>
Tested-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Chase Douglas <chase.douglas@canonical.com>
LKML-Reference: <1291129145.32004.874.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/sched.h
kernel/sched.c
kernel/timer.c