sched: fix overload performance: buddy wakeups
commitaa2ac25229cd4d0280f6174c42712744ad61b140
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 14 Mar 2008 20:12:12 +0000 (14 21:12 +0100)
committerIngo Molnar <mingo@elte.hu>
Sat, 15 Mar 2008 02:02:50 +0000 (15 03:02 +0100)
treee4450de1bb2cd4cd56d6abf64feb862c1d542653
parent27d117266097101dcf79c4576903cdcdd0eabffc
sched: fix overload performance: buddy wakeups

Currently we schedule to the leftmost task in the runqueue. When the
runtimes are very short because of some server/client ping-pong,
especially in over-saturated workloads, this will cycle through all
tasks trashing the cache.

Reduce cache trashing by keeping dependent tasks together by running
newly woken tasks first. However, by not running the leftmost task first
we could starve tasks because the wakee can gain unlimited runtime.

Therefore we only run the wakee if its within a small
(wakeup_granularity) window of the leftmost task. This preserves
fairness, but does alternate server/client task groups.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c
kernel/sched_fair.c