]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MI VM: Make it possible to set size of superpage at boot instead of compile time.
authorkib <kib@FreeBSD.org>
Fri, 18 Jan 2019 13:35:06 +0000 (13:35 +0000)
committerkib <kib@FreeBSD.org>
Fri, 18 Jan 2019 13:35:06 +0000 (13:35 +0000)
commitdb5030058fc34c6a68ab240c61da50ecf666124b
tree9734b780a0e01530be3030996a1f091eef65151f
parent9c01c6857ea99f3247eaaa558a4534eca67af5c8
MI VM: Make it possible to set size of superpage at boot instead of compile time.

In order to allow single kernel to use PAE pagetables on i386 if
hardware supports it, and fall back to classic two-level paging
structures if not, superpage code should be able to adopt to either 2M
or 4M superpages size.  There I make MI VM structures large enough to
track the biggest possible superpage, by allowing architecture to
define VM_NFREEORDER_MAX and VM_LEVEL_0_ORDER_MAX constants.
Corresponding VM_NFREEORDER and VM_LEVEL_0_ORDER symbols can be
defined as runtime values and must be less than the _MAX constants.
If architecture does not define _MAXs, it is assumed that _MAX ==
normal constant.

Reviewed by: markj
Tested by: pho (as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D18853
sys/vm/vm_phys.c
sys/vm/vm_phys.h
sys/vm/vm_reserv.c