Messages in this thread | | | From | Namhyung Kim <> | Subject | Re: [PATCH] sched: reduce sched_domain_topology space | Date | Wed, 16 Jan 2013 10:51:06 +0900 |
| |
Hi, liguang
On Tue, 15 Jan 2013 17:15:18 +0800, liguang wrote: > sched_domain_topology space was allocated by the size > ARRAY_SIZE(default_topology) + sched_domains_numa_levels, > suppose CONFIG_SCHED_SMT, CONFIG_SCHED_MC were y, > "static struct sched_domain_topology_level default_topology[] = { > { sd_init_SIBLING, cpu_smt_mask, }, > { sd_init_MC, cpu_coregroup_mask, }, > { sd_init_CPU, cpu_cpu_mask, }, > { NULL, }, > };" > then, ARRAY_SIZE(default_topology) equals to 4, > default_topology's NULL entry was accounted, > but, the following allocation for other sched_domains_numa_levels > entries was startd at 3(for default_topology[3].init is NULL), > so, 1 entry was forgot.
I don't think it's forgotten.
The sched_domain_topology still needs NULL entry at the end. So what the current code does is to set up following sched_domain_topology:
{ default_topology (without last NULL entry), numa topology, NULL }
Thanks, Namhyung
| |