linux-numa.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kornilios Kourtis <kkourt@cslab.ece.ntua.gr>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-numa@vger.kernel.org
Subject: Re: find the node that a cpu belongs to
Date: Tue, 17 Mar 2009 13:32:42 +0200	[thread overview]
Message-ID: <20090317113242.GA30922@solar.cslab.ece.ntua.gr> (raw)
In-Reply-To: <20090317104522.GN11935@one.firstfloor.org>

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().

Obviously, there isn't a hard requirement to include such a function in
libnuma, since it could be implemented using existing functions, or make
the allocations after the threads are spawned using numa_alloc_local().

On the other hand I'm guessing that it could be useful to other cases as
well.

cheers,
-- 
Kornilios Kourtis

  reply	other threads:[~2009-03-17 11:32 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 [this message]
2009-03-17 11:59     ` Andi Kleen
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=20090317113242.GA30922@solar.cslab.ece.ntua.gr \
    --to=kkourt@cslab.ece.ntua.gr \
    --cc=andi@firstfloor.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).