Skip to content

Commit 2c0a33f

Browse files
Nishanth Aravamudanmpe
authored andcommitted
powerpc/numa: ensure per-cpu NUMA mappings are correct on topology update
We received a report of warning in kernel/sched/core.c where the sched group was NULL on an LPAR after a topology update. This seems to occur because after the topology update has moved the CPUs, cpu_to_node is returning the old value still, which ends up breaking the consistency of the NUMA topology in the per-cpu maps. Ensure that we update the per-cpu fields when we re-map CPUs. Signed-off-by: Nishanth Aravamudan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 49f8d8c commit 2c0a33f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/powerpc/mm/numa.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1509,11 +1509,14 @@ static int update_cpu_topology(void *data)
15091509
cpu = smp_processor_id();
15101510

15111511
for (update = data; update; update = update->next) {
1512+
int new_nid = update->new_nid;
15121513
if (cpu != update->cpu)
15131514
continue;
15141515

15151516
unmap_cpu_from_node(cpu);
1516-
map_cpu_to_node(cpu, update->new_nid);
1517+
map_cpu_to_node(cpu, new_nid);
1518+
set_cpu_numa_node(cpu, new_nid);
1519+
set_cpu_numa_mem(cpu, local_memory_node(new_nid));
15171520
vdso_getcpu_init();
15181521
}
15191522

0 commit comments

Comments
 (0)