Skip to contentSkip to conversation

Running NUMA kernel on Tiger

PATCH Luck, Tony 1 participant 1 message Aug 28, 2003

Subsystems (2)
lore
Share & tools
lore

Luck, Tony

author
#0 lore raw

In case anyone else would like to experment with NUMA code, but doesn't have access to a NUMA machine ...

Here is a patch against 2.6.0test4 + ia64-030826 Mosberger patch that will allow you to configure a kernel with:

CONFIG_NUMA=y
CONFIG_ACPI_NUMA=y
CONFIG_DISCONTIGMEM=y
CONFIG_VIRTUAL_MEM_MAP=y

and boot on a Tiger. You may need to change the "phony_srat" initialization in drivers/acpi/tables.c to match the configuration of your machine, the version in this patch defines memory below 4G to be on node 0, and memory in the range 4G-8G to be on node 1. Cpu 0 & 1 are on node 0, cpu 2 & 3 are on node 1.

This patch includes some extra fixes in addition to adding the SRAT table:

1) execute find_memory() after acpi_numa_init() [arch/ia64/kernel/setup.c]

2) Don't allocate memory using alloc_bootmem() in early acpi initializations [drivers/acpi/tables.c]

3) Don't use any memory in a granule with a hole [arch/ia64/kernel/efi.c]

-Tony

[Thanks to Martin Hicks and Jesse Barnes for patches 1 & 2]

arch/ia64/kernel/efi.c +1 -1
diff -ru linux-2.6.0-test4/arch/ia64/kernel/efi.c tiger-numa/arch/ia64/kernel/efi.c
@@ -324,7 +324,7 @@
 				check_md = q;
 
 				if (check_md->attribute & EFI_MEMORY_WB)
-					trim_bottom(md, granule_addr);
+					trim_bottom(check_md, granule_addr);
 
 				if (check_md->phys_addr < granule_addr)
 					continue;
arch/ia64/kernel/setup.c +2 -1
diff -ru linux-2.6.0-test4/arch/ia64/kernel/setup.c tiger-numa/arch/ia64/kernel/setup.c
@@ -372,7 +372,6 @@
 	strlcpy(saved_command_line, *cmdline_p, sizeof(saved_command_line));
 
 	efi_init();
-	find_memory();
 
 #ifdef CONFIG_ACPI_BOOT
 	/* Initialize the ACPI boot-time table parser */
@@ -386,6 +385,8 @@
 # endif
 #endif /* CONFIG_APCI_BOOT */
 
+	find_memory();
+
 	/* process SAL system table: */
 	ia64_sal_init(efi.sal_systab);
 
drivers/acpi/tables.c +55 -0

108 lines not on this page · raw message