Only promote userspace mappings to superpages. This was dropped in r328510,

however due to the break-before-make requirement on arm64 is is currently
unsafe to promote kernel pages.

Sponsored by:	DARPA, AFRL
This commit is contained in:
Andrew Turner 2018-02-01 14:26:26 +00:00
parent c201b5644d
commit faa3fd222a

View File

@ -3076,12 +3076,13 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
}
#if VM_NRESERVLEVEL > 0
if ((mpte == NULL || mpte->wire_count == NL3PG) &&
pmap_superpages_enabled() &&
(m->flags & PG_FICTITIOUS) == 0 &&
vm_reserv_level_iffullpop(m) == 0) {
pmap_promote_l2(pmap, pde, va, &lock);
}
if (pmap != pmap_kernel() &&
(mpte == NULL || mpte->wire_count == NL3PG) &&
pmap_superpages_enabled() &&
(m->flags & PG_FICTITIOUS) == 0 &&
vm_reserv_level_iffullpop(m) == 0) {
pmap_promote_l2(pmap, pde, va, &lock);
}
#endif
if (lock != NULL)