diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-04-07 08:09:53 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-04-11 06:58:21 -0400 |
commit | 3859173d43658d51a749bc0201b943922577d39c (patch) | |
tree | 39ad8fcc235cc40076bcb3e5f34b8db6e2230880 /include/linux/sched.h | |
parent | a6c75f2f8d988ecfecf971f98f1cb6fc4de522fe (diff) |
sched: Reduce some allocation pressure
Since we now allocate SD_LV_MAX * nr_cpu_ids sched_domain/sched_group
structures when rebuilding the scheduler toplogy it might make sense
to shrink that depending on the CONFIG_ options.
This is only needed until we get rid of SD_LV_* alltogether and
provide a full dynamic topology interface.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20110407122942.406226449@chello.nl
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 020b79d6c486..5a9168b01db8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -897,12 +897,20 @@ static inline struct cpumask *sched_group_cpus(struct sched_group *sg) | |||
897 | 897 | ||
898 | enum sched_domain_level { | 898 | enum sched_domain_level { |
899 | SD_LV_NONE = 0, | 899 | SD_LV_NONE = 0, |
900 | #ifdef CONFIG_SCHED_SMT | ||
900 | SD_LV_SIBLING, | 901 | SD_LV_SIBLING, |
902 | #endif | ||
903 | #ifdef CONFIG_SCHED_MC | ||
901 | SD_LV_MC, | 904 | SD_LV_MC, |
905 | #endif | ||
906 | #ifdef CONFIG_SCHED_BOOK | ||
902 | SD_LV_BOOK, | 907 | SD_LV_BOOK, |
908 | #endif | ||
903 | SD_LV_CPU, | 909 | SD_LV_CPU, |
910 | #ifdef CONFIG_NUMA | ||
904 | SD_LV_NODE, | 911 | SD_LV_NODE, |
905 | SD_LV_ALLNODES, | 912 | SD_LV_ALLNODES, |
913 | #endif | ||
906 | SD_LV_MAX | 914 | SD_LV_MAX |
907 | }; | 915 | }; |
908 | 916 | ||