aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-11-24 11:05:04 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-24 11:51:10 -0500
commit6a7b3dc3440f7b5a9b67594af01ed562cdeb41e4 (patch)
treefdbe54d2c9cd665c6a76ed09e9e4b7c51fb4df20 /kernel/sched.c
parent6c99e9ad47d9c082bd096f42fb49e397b05d58a8 (diff)
sched: convert nohz_cpu_mask to cpumask_var_t.
Impact: (future) size reduction for large NR_CPUS. Dynamically allocating cpumasks (when CONFIG_CPUMASK_OFFSTACK) saves space for small nr_cpu_ids but big CONFIG_NR_CPUS. cpumask_var_t is just a struct cpumask for !CONFIG_CPUMASK_OFFSTACK. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 6b9606a6cabf..2723d7a4a42d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5870,9 +5870,9 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
5870 * indicates which cpus entered this state. This is used 5870 * indicates which cpus entered this state. This is used
5871 * in the rcu update to wait only for active cpus. For system 5871 * in the rcu update to wait only for active cpus. For system
5872 * which do not switch off the HZ timer nohz_cpu_mask should 5872 * which do not switch off the HZ timer nohz_cpu_mask should
5873 * always be CPU_MASK_NONE. 5873 * always be CPU_BITS_NONE.
5874 */ 5874 */
5875cpumask_t nohz_cpu_mask = CPU_MASK_NONE; 5875cpumask_var_t nohz_cpu_mask;
5876 5876
5877/* 5877/*
5878 * Increase the granularity value when there are more CPUs, 5878 * Increase the granularity value when there are more CPUs,
@@ -8274,6 +8274,9 @@ void __init sched_init(void)
8274 */ 8274 */
8275 current->sched_class = &fair_sched_class; 8275 current->sched_class = &fair_sched_class;
8276 8276
8277 /* Allocate the nohz_cpu_mask if CONFIG_CPUMASK_OFFSTACK */
8278 alloc_bootmem_cpumask_var(&nohz_cpu_mask);
8279
8277 scheduler_running = 1; 8280 scheduler_running = 1;
8278} 8281}
8279 8282