* [PATCH] powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove
@ 2017-12-05 20:55 Nathan Fontenot
2017-12-05 21:27 ` Nathan Fontenot
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Fontenot @ 2017-12-05 20:55 UTC (permalink / raw)
To: linuxppc-dev
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@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 {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove
2017-12-05 20:55 [PATCH] powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove Nathan Fontenot
@ 2017-12-05 21:27 ` Nathan Fontenot
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Fontenot @ 2017-12-05 21:27 UTC (permalink / raw)
To: linuxppc-dev
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@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 {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-05 21:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-05 20:55 [PATCH] powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove Nathan Fontenot
2017-12-05 21:27 ` Nathan Fontenot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).