[Top][All Lists]

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

Re: [Qemu-devel] [RFC PATCH v0] numa: API to lookup NUMA node by address

From: Eduardo Habkost
Subject: Re: [Qemu-devel] [RFC PATCH v0] numa: API to lookup NUMA node by address
Date: Mon, 25 May 2015 14:42:40 -0300
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, May 25, 2015 at 01:17:57PM +0530, Bharata B Rao wrote:
> On Thu, May 14, 2015 at 11:39:06AM +0200, Paolo Bonzini wrote:
> > On 13/05/2015 20:06, Eduardo Habkost wrote:
> > > Also, this introduces a circular dependency between pc-dimm.c and
> > > numa.c. Instead of that, pc-dimm could simply notify us when a new
> > > device is realized (with just (addr, end, node) as arguments), so we can
> > > save the list of memory ranges inside struct node_info.
> > > 
> > > I wonder if the memory API already provides something that would help
> > > us. Paolo, do you see a way we could simply use a MemoryRegion as input
> > > to lookup the NUMA node?
> > 
> > No, but I guess you could add a numa_get/set_memory_region_node_id API
> > that uses a hash table.  That's a variant of the "pc-dimm could simply
> > notify" numa.c that you propose above.
> While you say we can't use MemoryRegion as input to lookup the NUMA node,
> you suggest that we add numa_get/set_memory_region_node_id. Does this API
> get/set NUMA node id for the given MemoryRegion ? 

I was going to suggest that, but it would require changing the
non-memdev code path to create a MemoryRegion for each node, too. So
having a numa_set_mem_node_id(start_addr, end_addr, node_id) API would
be simpler.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]