]> bbs.cooldavid.org Git - net-next-2.6.git/commit - kernel/sched.c
sched: remove fixed NR_CPUS sized arrays in kernel_sched_c
authorMike Travis <travis@sgi.com>
Sat, 5 Apr 2008 01:11:04 +0000 (18:11 -0700)
committerIngo Molnar <mingo@elte.hu>
Sat, 19 Apr 2008 17:44:58 +0000 (19:44 +0200)
commit434d53b00d6bb7be0a1d3dcc0d0d5df6c042e164
tree9bf697c0891127157e75fea409d8d8167d210fd4
parentd366f8cbc16882e93538d9a52423c2f50dad7c06
sched: remove fixed NR_CPUS sized arrays in kernel_sched_c

 * Change fixed size arrays to per_cpu variables or dynamically allocated
   arrays in sched_init() and sched_init_smp().

     (1) static struct sched_entity *init_sched_entity_p[NR_CPUS];
     (1) static struct cfs_rq *init_cfs_rq_p[NR_CPUS];
     (1) static struct sched_rt_entity *init_sched_rt_entity_p[NR_CPUS];
     (1) static struct rt_rq *init_rt_rq_p[NR_CPUS];
 static struct sched_group **sched_group_nodes_bycpu[NR_CPUS];

     (1) - these arrays are allocated via alloc_bootmem_low()

 * Change sched_domain_debug_one() to use cpulist_scnprintf instead of
   cpumask_scnprintf.  This reduces the output buffer required and improves
   readability when large NR_CPU count machines arrive.

 * In sched_create_group() we allocate new arrays based on nr_cpu_ids.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c