sched: add avg_overlap decay
commitdf1c99d416500da8d26a4d78777467c53ee7689e
authorMike Galbraith <efault@gmx.de>
Tue, 10 Mar 2009 18:08:11 +0000 (10 19:08 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 11 Mar 2009 10:31:50 +0000 (11 11:31 +0100)
tree4f61ea769c43bfc985b760649d2c4ba5089ff608
parent57310a98a354e84279d7c8af2f48805a62372e53
sched: add avg_overlap decay

Impact: more precise avg_overlap metric - better load-balancing

avg_overlap is used to measure the runtime overlap of the waker and
wakee.

However, when a process changes behaviour, eg a pipe becomes
un-congested and we don't need to go to sleep after a wakeup
for a while, the avg_overlap value grows stale.

When running we use the avg runtime between preemption as a
measure for avg_overlap since the amount of runtime can be
correlated to cache footprint.

The longer we run, the less likely we'll be wanting to be
migrated to another CPU.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1236709131.25234.576.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c