[PATCH v2 2/4] powerpc/64/mm: implement page mapping percpu first chunk allocator

Aneesh Kumar K.V aneesh.kumar at linux.ibm.com
Mon Jun 8 17:12:37 AEST 2020


"Aneesh Kumar K.V" <aneesh.kumar at linux.ibm.com> writes:

> Implement page mapping percpu first chunk allocator as a fallback to
> the embedding allocator. With 4K hash translation we limit our page
> table range to 64TB and commit: 0034d395f89d ("powerpc/mm/hash64: Map all the
> kernel regions in the same 0xc range") moved all kernel mapping to
> that 64TB range. In-order to support sparse memory layout we need
> to increase our linear mapping space and reduce other mappings.
>
> With such a layout percpu embedded first chunk allocator will fail
> because of small vmalloc range. Add a fallback to page mapping
> percpu first chunk allocator for such failures.
>
> The below dmesg output can be observed in such case.
>
>  percpu: max_distance=0x1ffffef00000 too large for vmalloc space 0x10000000000
>  PERCPU: auto allocator failed (-22), falling back to page size
>  percpu: 40 4K pages/cpu s148816 r0 d15024
>

This patch requires powersave=off kernel command line to boot. We are
working to make sure we don't access per cpu variables in real mode.
Additionally, you can also try the below workaround patch

modified   arch/powerpc/kernel/mce.c
@@ -711,7 +711,7 @@ long hmi_exception_realmode(struct pt_regs *regs)
 {	
 	int ret;
 
-	__this_cpu_inc(irq_stat.hmi_exceptions);
+//	__this_cpu_inc(irq_stat.hmi_exceptions);
 
 	ret = hmi_handle_debugtrig(regs);
 	if (ret >= 0)


-aneesh


More information about the Linuxppc-dev mailing list