All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Kornilios Kourtis <kkourt@cslab.ece.ntua.gr>
Cc: Andi Kleen <andi@firstfloor.org>, linux-numa@vger.kernel.org
Subject: Re: find the node that a cpu belongs to
Date: Tue, 17 Mar 2009 12:59:07 +0100	[thread overview]
Message-ID: <20090317115907.GS11935@one.firstfloor.org> (raw)
In-Reply-To: <20090317113242.GA30922@solar.cslab.ece.ntua.gr>

On Tue, Mar 17, 2009 at 01:32:42PM +0200, Kornilios Kourtis wrote:
> On Tue, Mar 17, 2009 at 11:45:22AM +0100, Andi Kleen wrote:
> > On Tue, Mar 17, 2009 at 03:09:10AM +0200, Kornilios Kourtis wrote:
> > > Hi,
> > > 
> > > I was wondering if you would be interested in adding a libnuma function
> > > for determing the node that a cpu belongs to.
> > 
> > Concrete use case please. Why would you want to do that in a program?
> 
> My specific case is quite simple: I have a program that creates a number
> of threads that are bound to run in specific cpus. I want to pre-allocate
> memory in the node of the cpu that the thread will run before the threads
> are created using numa_alloc_onnode().

Normally the number of threads is dependent on the data layout, isn't it?
It seems like a backwards way of doing things, but ok.

BTW another known topology reporting hole is there is currently no way 
to report number of CPUs for a given node. Normally it's just max/cpus,
but that can change with CPU hotplug. On the other hand CPU/node hotplug
is currently not really supported anyways.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

  reply	other threads:[~2009-03-17 11:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17  1:09 find the node that a cpu belongs to Kornilios Kourtis
2009-03-17 10:45 ` Andi Kleen
2009-03-17 11:32   ` Kornilios Kourtis
2009-03-17 11:59     ` Andi Kleen [this message]
2009-03-18 15:19       ` Kornilios Kourtis
2009-03-19 14:16     ` Cliff Wickman

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=20090317115907.GS11935@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=kkourt@cslab.ece.ntua.gr \
    --cc=linux-numa@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.