lkml.org 
[lkml]   [2013]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched: reduce sched_domain_topology space
From
Date
在 2013-01-16三的 10:51 +0900,Namhyung Kim写道:
> 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

Oh, that's a trick!
Thanks!

--
regards!
li guang

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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