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

2015-06-11 Thread Bharata B Rao
On Thu, Jun 11, 2015 at 08:56:03AM +0200, Igor Mammedov wrote: > > > > And to make this work, it needs to be aware of NUMA information for > > > > hotplugged memory too. > > > I've checked spapr_populate_drconf_memory() from original series, > > > it needs to be aware at startup about address rang

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

2015-06-10 Thread Igor Mammedov
On Wed, 10 Jun 2015 18:20:53 +0530 Bharata B Rao wrote: > On Wed, Jun 10, 2015 at 11:43:19AM +0200, Igor Mammedov wrote: > > On Tue, 9 Jun 2015 09:40:54 -0300 > > Eduardo Habkost wrote: > > > > > On Tue, Jun 09, 2015 at 11:23:19AM +0200, Igor Mammedov wrote: > > > > On Mon, 8 Jun 2015 12:51:39

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

2015-06-10 Thread Bharata B Rao
On Wed, Jun 10, 2015 at 11:43:19AM +0200, Igor Mammedov wrote: > On Tue, 9 Jun 2015 09:40:54 -0300 > Eduardo Habkost wrote: > > > On Tue, Jun 09, 2015 at 11:23:19AM +0200, Igor Mammedov wrote: > > > On Mon, 8 Jun 2015 12:51:39 -0300 > > > Eduardo Habkost wrote: > > > > > > > On Mon, Jun 08, 201

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

2015-06-10 Thread Eduardo Habkost
On Wed, Jun 10, 2015 at 11:43:19AM +0200, Igor Mammedov wrote: > On Tue, 9 Jun 2015 09:40:54 -0300 > Eduardo Habkost wrote: > > > On Tue, Jun 09, 2015 at 11:23:19AM +0200, Igor Mammedov wrote: > > > On Mon, 8 Jun 2015 12:51:39 -0300 > > > Eduardo Habkost wrote: > > > > > > > On Mon, Jun 08, 201

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

2015-06-10 Thread Igor Mammedov
On Tue, 9 Jun 2015 09:40:54 -0300 Eduardo Habkost wrote: > On Tue, Jun 09, 2015 at 11:23:19AM +0200, Igor Mammedov wrote: > > On Mon, 8 Jun 2015 12:51:39 -0300 > > Eduardo Habkost wrote: > > > > > On Mon, Jun 08, 2015 at 11:51:03AM +0200, Igor Mammedov wrote: > > > > On Mon, 8 Jun 2015 11:28:18

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

2015-06-09 Thread Eduardo Habkost
On Tue, Jun 09, 2015 at 11:23:19AM +0200, Igor Mammedov wrote: > On Mon, 8 Jun 2015 12:51:39 -0300 > Eduardo Habkost wrote: > > > On Mon, Jun 08, 2015 at 11:51:03AM +0200, Igor Mammedov wrote: > > > On Mon, 8 Jun 2015 11:28:18 +0530 > > > Bharata B Rao wrote: > > > > > > > On Mon, May 25, 2015

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

2015-06-09 Thread Igor Mammedov
On Mon, 8 Jun 2015 12:51:39 -0300 Eduardo Habkost wrote: > On Mon, Jun 08, 2015 at 11:51:03AM +0200, Igor Mammedov wrote: > > On Mon, 8 Jun 2015 11:28:18 +0530 > > Bharata B Rao wrote: > > > > > On Mon, May 25, 2015 at 02:42:40PM -0300, Eduardo Habkost wrote: > > > > On Mon, May 25, 2015 at 01:

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

2015-06-08 Thread Eduardo Habkost
On Mon, Jun 08, 2015 at 05:55:10PM +0200, Paolo Bonzini wrote: > On 08/06/2015 17:51, Eduardo Habkost wrote: > > > > Having a numa_set_memory_region_node_id(MemoryRegion *mr, int node) API > > would probably be better, and make the discussion about pc_dimm.addr > > moot. But it would require chang

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

2015-06-08 Thread Paolo Bonzini
On 08/06/2015 17:51, Eduardo Habkost wrote: > > Having a numa_set_memory_region_node_id(MemoryRegion *mr, int node) API > would probably be better, and make the discussion about pc_dimm.addr > moot. But it would require changing > memory_region_allocate_system_memory() to avoid > allocate_system

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

2015-06-08 Thread Eduardo Habkost
On Mon, Jun 08, 2015 at 11:51:03AM +0200, Igor Mammedov wrote: > On Mon, 8 Jun 2015 11:28:18 +0530 > Bharata B Rao wrote: > > > On Mon, May 25, 2015 at 02:42:40PM -0300, Eduardo Habkost wrote: > > > On Mon, May 25, 2015 at 01:17:57PM +0530, Bharata B Rao wrote: > > > > On Thu, May 14, 2015 at 11:

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

2015-06-08 Thread Igor Mammedov
On Mon, 8 Jun 2015 11:28:18 +0530 Bharata B Rao wrote: > On Mon, May 25, 2015 at 02:42:40PM -0300, Eduardo Habkost wrote: > > 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 Ha

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

2015-06-07 Thread Bharata B Rao
On Mon, May 25, 2015 at 02:42:40PM -0300, Eduardo Habkost wrote: > 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

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

2015-05-25 Thread Eduardo Habkost
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

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

2015-05-25 Thread Bharata B Rao
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, en

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

2015-05-14 Thread Paolo Bonzini
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 s

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

2015-05-13 Thread Eduardo Habkost
On Thu, May 07, 2015 at 12:34:24PM +0530, Bharata B Rao wrote: > Keep track of start and end address of each NUMA node in numa_info > structure so that lookup of node by address becomes easier. Add > an API numa_get_node() to lookup a node by address. > > This is needed by sPAPR PowerPC to support

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

2015-05-13 Thread Bharata B Rao
CC'ing Eduardo... Does this approach look sane ? Currently only PowerPC needs this, however is this API correct from other architectures' perspective ? On Thu, May 07, 2015 at 12:34:24PM +0530, Bharata B Rao wrote: > Keep track of start and end address of each NUMA node in numa_info > structure s

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

2015-05-07 Thread Bharata B Rao
Keep track of start and end address of each NUMA node in numa_info structure so that lookup of node by address becomes easier. Add an API numa_get_node() to lookup a node by address. This is needed by sPAPR PowerPC to support ibm,dynamic-reconfiguration-memory device tree node which is needed for