linux-stable/arch/powerpc/mm
Laurent Dufour 9c7248bb8d powerpc/numa: Consider the max NUMA node for migratable LPAR
When a LPAR is migratable, we should consider the maximum possible NUMA
node instead of the number of NUMA nodes from the actual system.

The DT property 'ibm,current-associativity-domains' defines the maximum
number of nodes the LPAR can see when running on that box. But if the
LPAR is being migrated on another box, it may see up to the nodes
defined by 'ibm,max-associativity-domains'. So if a LPAR is migratable,
that value should be used.

Unfortunately, there is no easy way to know if an LPAR is migratable or
not. The hypervisor exports the property 'ibm,migratable-partition' in
the case it set to migrate partition, but that would not mean that the
current partition is migratable.

Without this patch, when a LPAR is started on a 2 node box and then
migrated to a 3 node box, the hypervisor may spread the LPAR's CPUs on
the 3rd node. In that case if a CPU from that 3rd node is added to the
LPAR, it will be wrongly assigned to the node because the kernel has
been set to use up to 2 nodes (the configuration of the departure node).
With this patch applies, the CPU is correctly added to the 3rd node.

Fixes: f9f130ff2e ("powerpc/numa: Detect support for coregroup")
Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210511073136.17795-1-ldufour@linux.ibm.com
2021-08-10 23:14:55 +10:00
..
book3s32 powerpc/32s: Fix setup_{kuap/kuep}() on SMP 2021-06-30 22:20:39 +10:00
book3s64 powerpc/kexec: blacklist functions called in real mode for kprobe 2021-07-26 20:38:51 +10:00
kasan powerpc updates for 5.10 2020-10-16 12:21:15 -07:00
nohash powerpc/4xx: Fix setup_kuep() on SMP 2021-06-30 22:21:02 +10:00
ptdump powerpc/mm: Properly coalesce pages in ptdump 2021-06-25 00:07:10 +10:00
cacheflush.c powerpc/mem: Use kmap_local_page() in flushing functions 2021-04-14 23:04:19 +10:00
copro_fault.c mm: clean up the last pieces of page fault accountings 2020-08-12 10:58:04 -07:00
dma-noncoherent.c dma-mapping: merge <linux/dma-noncoherent.h> into <linux/dma-map-ops.h> 2020-10-06 07:07:06 +02:00
drmem.c pseries/drmem: don't cache node id in drmem_lmb struct 2020-09-02 11:00:21 +10:00
fault.c powerpc/mm: Fix lockup on kernel exec fault 2021-07-05 22:23:24 +10:00
hugetlbpage.c hugetlb: pass vma into huge_pte_alloc() and huge_pmd_share() 2021-05-05 11:27:20 -07:00
init-common.c powerpc: Inline setup_kup() 2020-12-15 13:13:49 +11:00
init_32.c powerpc: Enable KFENCE for PPC32 2021-03-24 14:09:30 +11:00
init_64.c Merge branch 'fixes' into next 2020-09-14 22:57:18 +10:00
ioremap.c mm/vmalloc: remove unmap_kernel_range 2021-04-30 11:20:40 -07:00
ioremap_32.c powerpc/mm: Leave a gap between early allocated IO areas 2021-06-25 00:07:10 +10:00
ioremap_64.c powerpc/mm: Leave a gap between early allocated IO areas 2021-06-25 00:07:10 +10:00
maccess.c powerpc: Don't use 'struct ppc_inst' to reference instruction location 2021-06-17 00:09:00 +10:00
Makefile powerpc updates for 5.14 2021-07-02 12:54:34 -07:00
mem.c powerpc updates for 5.14 2021-07-02 12:54:34 -07:00
mmap.c
mmu_context.c KVM: PPC: Book3S HV: Implement radix prefetch workaround by disabling MMU 2021-06-10 22:12:14 +10:00
mmu_decl.h powerpc: Enable KFENCE for PPC32 2021-03-24 14:09:30 +11:00
numa.c powerpc/numa: Consider the max NUMA node for migratable LPAR 2021-08-10 23:14:55 +10:00
pageattr.c powerpc/mm: implement set_memory_attr() 2021-06-21 21:13:21 +10:00
pgtable-frag.c powerpc/mm/radix: Fix PTE/PMD fragment count for early page table mappings 2020-07-20 22:57:56 +10:00
pgtable.c powerpc/64s: Fix boot failure with 4K Radix 2021-06-25 00:06:54 +10:00
pgtable_32.c powerpc/32: use set_memory_attr() 2021-06-21 21:13:21 +10:00
pgtable_64.c mm: rename p4d_page_vaddr to p4d_pgtable and make it return pud_t * 2021-07-08 11:48:22 -07:00
slice.c powerpc: Replace _ALIGN_UP() by ALIGN() 2020-05-11 23:15:15 +10:00