sched: Fix rebalance interval calculation
authorSisir Koppaka <sisir.koppaka@gmail.com>
Sat, 26 Mar 2011 12:52:55 +0000 (18:22 +0530)
committerIngo Molnar <mingo@elte.hu>
Thu, 31 Mar 2011 11:00:37 +0000 (13:00 +0200)
commit3436ae1298cb22d722a6520fc97f112dd767a9e1
treeba05a2b0a80157f9eb19e34b0ac54b9dd279600b
parente2495b577324938f0209b4f895c5f205c7e47854
sched: Fix rebalance interval calculation

The interval for checking scheduling domains if they are due to be
balanced currently depends on boot state NR_CPUS, which may not
accurately reflect the number of online CPUs at the time of check.

Thus replace NR_CPUS with num_online_cpus().

 (ed: Should only affect those who set NR_CPUS really high, such as 4096
      or so :-)

Signed-off-by: Sisir Koppaka <sisir.koppaka@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <AANLkTikqHWid2Q93F5U5Qw5snJH8C5PXoa7J6=6hYO94@mail.gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c