lkml.org 
[lkml]   [2013]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] sched: reduce sched_domain_topology space
Date
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


\
 
 \ /
  Last update: 2013-01-16 03:41    [W:0.048 / U:2.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site