HomeFreeBSD

pmap: don't recompute mpte during promotion

Description

pmap: don't recompute mpte during promotion

When attempting to promote 4KB user-space mappings to a 2MB user-space
mapping, the address of the struct vm_page representing the page table
page that contains the 4KB mappings is already known to the caller.
Pass that address to the promotion function rather than making the
promotion function recompute it, which on arm64 entails iteration over
the vm_phys_segs array by PHYS_TO_VM_PAGE(). And, while I'm here,
eliminate unnecessary arithmetic from the calculation of the first PTE's
address on arm64.

MFC after: 1 week

Details

Provenance
alcAuthored on Sep 9 2022, 11:34 PM
Parents
rGb20ec58669e2: vfs.typenumhash: fix sysctl description
Branches
Unknown
Tags
Unknown