HomeFreeBSD

amd64/pmap: fix user page table page accounting

Description

amd64/pmap: fix user page table page accounting

When a superpage mapping is destroyed and the original page table page
containing 4KB mappings that was being held in reserve is deallocated,
the recently introduced user page table page count was not being
decremented. Consequentially, the count was wrong and would grow over
time. For example, after multiple iterations of "buildworld", I was
seeing implausible counts, like the following:

vm.pmap.kernel_pt_page_count: 2184
vm.pmap.user_pt_page_count: 2280849
vm.pmap.pv_page_count: 106

With this change, I now see:

vm.pmap.kernel_pt_page_count: 2183
vm.pmap.user_pt_page_count: 344
vm.pmap.pv_page_count: 105

Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D33276

Details

Provenance
alcAuthored on Dec 5 2021, 11:40 PM
Reviewer
kib
Differential Revision
D33276: amd64: fix user pt_page accounting
Parents
rG9f32cb5b1c81: Set uninitialized popmap bits in vm_reserv_init
Branches
Unknown
Tags
Unknown