On Thu, Jun 11, 2015 at 08:56:03AM +0200, Igor Mammedov wrote: <snip> > > > > 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 ranges -> node mapping > > > including mapping partitioning of whole hotplug memory range > > > (i.e. not actual hotplugged memory). > > > -numa node_mem & numa_set_mem_node_id() are sufficient for this purpose > > > > spapr_populate_drconf_memory() needs to know about node information for > > boot time memory as well as the hotplugged pc-dimm memory. Since chunks > > of hotplug memory range could be plugged into any node, we need to > > be able to locate the node id for such memory range. This is where > > numa_set_mem_node_id() call for each realized dimm will help. > So you are saying that spapr_populate_drconf_memory() doesn't need to know > in advance about unplugged memory ranges and could be updated at runtime. > (I've thought that device tree is build only at boot and guest can't > accept dynamic updates to it, therefore you'd need provide addr -> node_id > mapping at boot time including for not yet plugged memory).
Here are we dynamically adding a device tree node at runtime when guest issues ibm,architecture-client-support call during early boot. Guest firmware (SLOF) has already been updated to support such dynamic update. During hotplug the node id information is also updated in ibm,dynamic-memory property that is present under this device tree node. Regards, Bharata.