]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove
authorNathan Fontenot <nfont@linux.vnet.ibm.com>
Fri, 26 Jan 2018 19:41:59 +0000 (13:41 -0600)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 23 Feb 2018 14:26:36 +0000 (08:26 -0600)
commitbb2f2cf38114d5a329429b3f43d14170f682245e
tree9871dc0dc1582710ddafd0c0a3a5477380383946
parenta86b2492b7e5a669b3f633a835efd29f001a8cfa
powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove

BugLink: http://bugs.launchpad.net/bugs/1751131
commit 1d9a090783bef19fe8cdec878620d22f05191316 upstream.

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.

This bug looks like it was introduced in 2004 in the commit titled
"ppc64: cpu hotplug notifier for numa", which is 6b15e4e87e32 in the
linux-fullhist tree. Hence tag it for all stable releases.

Cc: stable@vger.kernel.org
Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/powerpc/include/asm/topology.h
arch/powerpc/mm/numa.c
arch/powerpc/platforms/pseries/hotplug-cpu.c