提交 3859173d 编写于 作者: P Peter Zijlstra 提交者: Ingo Molnar

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: NPeter 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.nlSigned-off-by: NIngo Molnar <mingo@elte.hu>
上级 a6c75f2f
......@@ -897,12 +897,20 @@ static inline struct cpumask *sched_group_cpus(struct sched_group *sg)
enum sched_domain_level {
SD_LV_NONE = 0,
#ifdef CONFIG_SCHED_SMT
SD_LV_SIBLING,
#endif
#ifdef CONFIG_SCHED_MC
SD_LV_MC,
#endif
#ifdef CONFIG_SCHED_BOOK
SD_LV_BOOK,
#endif
SD_LV_CPU,
#ifdef CONFIG_NUMA
SD_LV_NODE,
SD_LV_ALLNODES,
#endif
SD_LV_MAX
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册