Messages in this thread | | | Date | Wed, 20 Jan 2010 15:32:26 -0800 (PST) | From | David Rientjes <> | Subject | Re: [patch] x86: set hotpluggable nodes in nodes_possible_map |
| |
On Wed, 20 Jan 2010, Yinghai Lu wrote:
> > nodes_possible_map does not currently include nodes that have SRAT > > entries that are all ACPI_SRAT_MEM_HOT_PLUGGABLE since the bit is cleared > > in nodes_parsed if it does not have an online address range. > > > > Unequivocally setting the bit in nodes_parsed is insufficient since > > existing code, such as acpi_get_nodes(), assumes all nodes in the map > > have online address ranges. In fact, all code using nodes_parsed assumes > > such nodes represent an address range of online memory. > > > > nodes_possible_map is created by unioning nodes_parsed and > > cpu_nodes_parsed; the former represents nodes with online memory and the > > latter represents memoryless nodes. We now set the bit for hotpluggable > > nodes in cpu_nodes_parsed so that it also gets set in nodes_possible_map. > > > > Signed-off-by: David Rientjes <rientjes@google.com> > > --- > > arch/x86/mm/srat_64.c | 4 +++- > > 1 files changed, 3 insertions(+), 1 deletions(-) > > > > diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c > > --- a/arch/x86/mm/srat_64.c > > +++ b/arch/x86/mm/srat_64.c > > @@ -229,9 +229,11 @@ update_nodes_add(int node, unsigned long start, unsigned long end) > > printk(KERN_ERR "SRAT: Hotplug zone not continuous. Partly ignored\n"); > > } > > > > - if (changed) > > + if (changed) { > > + node_set(node, cpu_nodes_parsed); > > printk(KERN_INFO "SRAT: hot plug zone found %Lx - %Lx\n", > > nd->start, nd->end); > > + } > > } > > > > /* Callback for parsing of the Proximity Domain <-> Memory Area mappings */ > > if (ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) { > update_nodes_add(node, start, end); > /* restore nodes[node] */ > *nd = oldnode; > if ((nd->start | nd->end) == 0) > node_clear(node, nodes_parsed); > } > > removing clearing with nodes_parsed is not working? >
As previously discussed in this thread, the semantics of nodes_parsed is to define nodes that have online address ranges; all code written to use nodes_parsed operates on those address ranges. Requiring it to also support memoryless (or hotpluggable) nodes would require a change in semantics in other areas such as acpi_get_nodes() and would be contrary to the effort in dc098551 to fix this inconsistency.
I believe Haicheng will be posting an incremental patch that changes the name of cpu_nodes_parsed to something such as acpi_nodes_parsed to indicate it does not necessarily represent memory but rather another ACPI definition: either a node including only cpus or hotpluggable ranges.
| |