Re: [PATCH] x86/mm: Pre-allocate p4d/pud pages for vmalloc area

From: Peter Zijlstra
Date: Fri Jun 26 2020 - 07:08:17 EST


On Fri, Jun 26, 2020 at 11:34:50AM +0200, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@xxxxxxx>
>
> Pre-allocate the page-table pages for the vmalloc area at the level
> which needs synchronization on x86. This is P4D for 5-level and PUD
> for 4-level paging.
>
> Doing this at boot makes sure all page-tables in the system have these
> pages already and do not need to be synchronized at runtime. The
> runtime synchronizatin takes the pgd_lock and iterates over all
> page-tables in the system, so it can take quite long and is better
> avoided.
>
> Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
> ---

Can't we now remove arch_sync_kernel_mappings() from this same file?