Re: find the node that a cpu belongs to

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux