]> git.baikalelectronics.ru Git - kernel.git/commit
sched: Do less agressive buddy clearing
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 9 Oct 2009 10:43:07 +0000 (12:43 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 14 Oct 2009 13:02:34 +0000 (15:02 +0200)
commita85cf546ca9adf670db28ff64f26c6bfa0d81ced
tree1e71e909fbf74b09863815549dbbe67d1661ab2b
parentde1c787ca734ca7900404c0a734d7bb8e0df8d1d
sched: Do less agressive buddy clearing

Yanmin reported a hackbench regression due to:

 > commit 78489252398e23f232c202be8109142bbe6b1b95
 > Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
 > Date:   Thu Sep 17 09:01:20 2009 +0200
 >
 >     sched: Stop buddies from hogging the system

I really liked 78489252, and it affecting hackbench shows I wasn't
crazy ;-)

So hackbench is a multi-cast, with one sender spraying multiple
receivers, who in their turn don't spray back.

This would be exactly the scenario that patch 'cures'. Previously
we would not clear the last buddy after running the next task,
allowing the sender to get back to work sooner than it otherwise
ought to have been, increasing latencies for other tasks.

Now, since those receivers don't poke back, they don't enforce the
buddy relation, which means there's nothing to re-elect the sender.

Cure this by less agressively clearing the buddy stats. Only clear
buddies when they were not chosen. It should still avoid a buddy
sticking around long after its served its time.

Reported-by: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
CC: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1255084986.8802.46.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c