mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: li guang <lig.fnst@cn.fujitsu.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: mingo@redhat.com, peterz@infradead.org, Morten.Rasmussen@arm.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: reduce sched_domain_topology space
Date: Wed, 16 Jan 2013 10:09:26 +0800	[thread overview]
Message-ID: <1358302166.23348.7.camel@liguang.fnst.cn.fujitsu.com> (raw)
In-Reply-To: <87r4llnbed.fsf@sejong.aot.lge.com>

在 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


  reply	other threads:[~2013-01-16  2:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15  9:15 liguang
2013-01-16  1:51 ` Namhyung Kim
2013-01-16  2:09   ` li guang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-01-15  9:06 liguang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358302166.23348.7.camel@liguang.fnst.cn.fujitsu.com \
    --to=lig.fnst@cn.fujitsu.com \
    --cc=Morten.Rasmussen@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®