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>
This commit is contained in:
committed by
Ingo Molnar
parent
6c99e9ad47
commit
6a7b3dc344
@@ -5870,9 +5870,9 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
|
||||
* indicates which cpus entered this state. This is used
|
||||
* in the rcu update to wait only for active cpus. For system
|
||||
* which do not switch off the HZ timer nohz_cpu_mask should
|
||||
* always be CPU_MASK_NONE.
|
||||
* always be CPU_BITS_NONE.
|
||||
*/
|
||||
cpumask_t nohz_cpu_mask = CPU_MASK_NONE;
|
||||
cpumask_var_t nohz_cpu_mask;
|
||||
|
||||
/*
|
||||
* Increase the granularity value when there are more CPUs,
|
||||
@@ -8274,6 +8274,9 @@ void __init sched_init(void)
|
||||
*/
|
||||
current->sched_class = &fair_sched_class;
|
||||
|
||||
/* Allocate the nohz_cpu_mask if CONFIG_CPUMASK_OFFSTACK */
|
||||
alloc_bootmem_cpumask_var(&nohz_cpu_mask);
|
||||
|
||||
scheduler_running = 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user