Skip to contentSkip to conversation

x86 numa: fix nodes' memory parsing when SRAT table includes future-hotplug memory range

PATCH Yang, Xiaowei 1 participant 1 message Aug 12, 2009

lore
Share & tools
lore
#0 lore raw

A node's future-hotplug memory range starts from very high end normally, e.g. 1TB, and is not continuous with its current existing memory range. It should not be covered by the global variable 'nodes' as it assumes the node's memory is continuous. Otherwise it can make nodes' memory ranges become very big and overlapped, and populate_memnodemap() fails.

We can ignore future-hotplug memory range for now. Physical memory hotplug support in future will handle it.

Thanks,
Xiaowei

xen/arch/x86/srat.c +14 -3
diff -r e35a1c004fc2 xen/arch/x86/srat.c
@@ -189,10 +189,21 @@
 		bad_srat();
 		return;
 	}
-	/* It is fine to add this area to the nodes data it will be used later*/
-	if (ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)
-		printk(KERN_INFO "SRAT: hot plug zone found %"PRIx64" - %"PRIx64" \n",
+	if (ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) {
+		if (page_is_ram_type(paddr_to_pfn(start), RAM_TYPE_CONVENTIONAL))
+			printk(KERN_INFO "SRAT: hot-pluggable zone found %"PRIx64" - %"PRIx64" \n",
 				start, end);
+		else {
+			/* TODO: This range contains no existing memory yet,
+			 * and shouldn't be included in nodes' [start, end]. It
+			 * will be covered with physical memory hotplug support
+			 * in future.
+                         */
+			printk(KERN_INFO "SRAT: future hotplug zone found %"PRIx64" - %"PRIx64" \n",
+				start, end);
+			return;
+		}
+	}
 	i = conflicting_nodes(start, end);
 	if (i == node) {
 		printk(KERN_WARNING

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel