Skip to contentSkip to conversation

arch_numa: fix broken NUMA emulation with dummy_numa_init()

PATCH New Sang-Heon Jeon 1 participant 1 message Nov 14

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch_numa: fix broken NUMA emulation with dummy_numa_init()

If arch_numa_init() falls back to dummy_numa_init(), numa_off is set to true before numa_emulation() runs. Then numa_emulation() calls fix_pxm_node_maps(), which fails when CONFIG_ACPI_NUMA is enabled and numa_off is true, so numa=fake is ignored in that case.

So set numa_off in arch_numa_init() after numa_emulation() runs instead.

Fixes 63db8170bf34 ("mm/fake-numa: allow later numa node hotplug")
---
 mm/arch_numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/arch_numa.c +1 -1
index 940e6d5f0023..5742ca7d98be 100644
@@ -265,7 +265,6 @@ static int __init dummy_numa_init(void)
 		return ret;
 	}
 
-	numa_off = true;
 	return 0;
 }
 
@@ -305,6 +304,7 @@ void __init arch_numa_init(void)
 	}
 
 	numa_init(dummy_numa_init);
+	numa_off = true;
 }
 
 #ifdef CONFIG_NUMA_EMU

base-commit: d9a27fa1050902a6e38bdb780b0277cbf1dfa5a5

Signature · 1 line
2.53.0