sched: Unify load_balance{,_newidle}()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 23 Dec 2009 14:10:31 +0000 (15:10 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 21 Jan 2010 12:40:13 +0000 (13:40 +0100)
commit1af3ed3ddf27499c3f57662c4c29871e2b95e5f9
tree12e478c9ae078aa7efd8675564cffeb34708d074
parentbaa8c1102f0cd86e69c1497d61d2ee177e663663
sched: Unify load_balance{,_newidle}()

load_balance() and load_balance_newidle() look remarkably similar, one
key point they differ in is the condition on when to active balance.

So split out that logic into a separate function.

One side effect is that previously load_balance_newidle() used to fail
and return -1 under these conditions, whereas now it doesn't. I've not
yet fully figured out the whole -1 return case for either
load_balance{,_newidle}().

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