aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2011-04-05 04:14:25 -0400
committerIngo Molnar <mingo@elte.hu>2011-04-05 04:29:36 -0400
commit49c022e657fbe661460d191fbe776a387132e2b3 (patch)
tree487b713816a5ff3d81437aeecf111ffa414f6ede /kernel/sched.c
parentb2a8b4b81966094703088a7bc76a313af841924d (diff)
sched: Clean up rebalance_domains() load-balance interval calculation
Instead of the possible multiple-evaluation of num_online_cpus() in rebalance_domains() that Linus reported, avoid it altogether in the normal case since it's implemented with a Hamming weight function over a cpu bitmask which can be darn expensive for those with big iron. This also makes it cleaner, smaller and documents the code. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1301991265.2225.12.camel@twins> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index a8845516ace6..17b4d226ee0d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6331,6 +6331,9 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
6331 break; 6331 break;
6332#endif 6332#endif
6333 } 6333 }
6334
6335 update_max_interval();
6336
6334 return NOTIFY_OK; 6337 return NOTIFY_OK;
6335} 6338}
6336 6339