]> www.infradead.org Git - users/dwmw2/linux.git/commit
riscv: Enable pcpu page first chunk allocator
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Tue, 12 Dec 2023 21:34:57 +0000 (22:34 +0100)
committerDennis Zhou <dennis@kernel.org>
Thu, 14 Dec 2023 08:24:06 +0000 (00:24 -0800)
commit6b9f29b81b155af023da95f560f738f29722b306
treefa31f30d1576fb32ca2c77d3f818688ea1a317fe
parent7a92fc8b4d20680e4c20289a670d8fca2d1f2c1b
riscv: Enable pcpu page first chunk allocator

As explained in commit 6ea529a2037c ("percpu: make embedding first chunk
allocator check vmalloc space size"), the embedding first chunk allocator
needs the vmalloc space to be larger than the maximum distance between
units which are grouped into NUMA nodes.

On a very sparse NUMA configurations and a small vmalloc area (for example,
it is 64GB in sv39), the allocation of dynamic percpu data in the vmalloc
area could fail.

So provide the pcpu page allocator as a fallback in case we fall into
such a sparse configuration (which happened in arm64 as shown by
commit 09cea6195073 ("arm64: support page mapping percpu first chunk
allocator")).

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
arch/riscv/Kconfig
arch/riscv/mm/kasan_init.c