[lkml]   [2023]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] riscv: mm: Pre-allocate PGD entries vmalloc/modules area
Björn Töpel <> writes:

> From: Björn Töpel <>
> The RISC-V port requires that kernel PGD entries are to be
> synchronized between MMs. This is done via the vmalloc_fault()
> function, that simply copies the PGD entries from init_mm to the
> faulting one.
> Historically, faulting in PGD entries have been a source for both bugs
> [1], and poor performance.
> One way to get rid of vmalloc faults is by pre-allocating the PGD
> entries. Pre-allocating the entries potientially wastes 64 * 4K (65 on
> SV39). The pre-allocation function is pulled from Jörg Rödel's x86
> work, with the addition of 3-level page tables (PMD allocations).
> The pmd_alloc() function needs the ptlock cache to be initialized
> (when split page locks is enabled), so the pre-allocation is done in a
> RISC-V specific pgtable_cache_init() implementation.
> Pre-allocate the kernel PGD entries for the vmalloc/modules area, but
> only for 64b platforms.
> Link: # [1]
> Signed-off-by: Björn Töpel <>

...and the build was bitten by nommu [1]. I'll hold off the v2 a bit, to
see if there's any other comments.



 \ /
  Last update: 2023-05-30 08:38    [W:0.067 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site