[PATCH] powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove

Nathan Fontenot nfont at linux.vnet.ibm.com
Wed Dec 6 08:27:28 AEDT 2017


Disregard. I'll send an updated patch soon.

-Nathan

On 12/05/2017 02:55 PM, Nathan Fontenot wrote:
> When DLPAR removing a CPU, the unmapping of the cpu from a node in
> unmap_cpu_from_node() should also invalidate the CPUs entry in the
> numa_cpu_lookup_table. There is not a guarantee that on a subsequent
> DLPAR add of the CPU the associativity will be the same and thus
> could be in a different node. Invalidating the entry in the
> numa_cpu_lookup_table causes the associativity to be read from the
> device tree at the time of the add.
> 
> The current behavior of not invalidating the CPUs entry in the
> numa_cpu_lookup_table can result in scenarios where the the topology
> layout of CPUs in the partition does not match the device tree
> or the topology reported by the HMC.
> 
> Signed-off-by: Nathan Fontenot <nfont at linux.vnet.ibm.com>
> ---
>  arch/powerpc/mm/numa.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> index adb6364f4091..415b1a76b429 100644
> --- a/arch/powerpc/mm/numa.c
> +++ b/arch/powerpc/mm/numa.c
> @@ -164,6 +164,8 @@ static void unmap_cpu_from_node(unsigned long cpu)
> 
>  	dbg("removing cpu %lu from node %d\n", cpu, node);
> 
> +	update_numa_cpu_lookup_table(cpu, -1);
> +
>  	if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) {
>  		cpumask_clear_cpu(cpu, node_to_cpumask_map[node]);
>  	} else {
> 



More information about the Linuxppc-dev mailing list