OSDN Git Service

x86/mm: Pre-allocate P4D/PUD pages for vmalloc area
authorJoerg Roedel <jroedel@suse.de>
Tue, 21 Jul 2020 09:59:51 +0000 (11:59 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 27 Jul 2020 10:32:29 +0000 (12:32 +0200)
commit6eb82f9940267d3af260989d077a2833f588beae
treebbeb2b40c522f162f51e8739da46cbc973973589
parent92ed301919932f777713b9172e525674157e983d
x86/mm: Pre-allocate P4D/PUD pages for vmalloc area

Pre-allocate the page-table pages for the vmalloc area at the level
which needs synchronization on x86-64, which is P4D for 5-level and
PUD for 4-level paging.

Doing this at boot makes sure no synchronization of that area is
necessary at runtime. The synchronization 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@suse.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/20200721095953.6218-2-joro@8bytes.org
arch/x86/mm/init_64.c