Page MenuHomeFreeBSD

amd64: fix user pt_page accounting
ClosedPublic

Authored by alc on Dec 5 2021, 6:50 PM.
Tags
None
Referenced Files
F153552724: D33276.diff
Tue, Apr 21, 8:36 PM
Unknown Object (File)
Tue, Apr 21, 8:07 AM
Unknown Object (File)
Tue, Apr 21, 7:54 AM
Unknown Object (File)
Tue, Apr 21, 5:10 AM
Unknown Object (File)
Tue, Apr 21, 4:55 AM
Unknown Object (File)
Tue, Apr 21, 2:16 AM
Unknown Object (File)
Sun, Apr 19, 1:16 AM
Unknown Object (File)
Fri, Apr 17, 12:24 PM
Subscribers

Details

Summary

When a superpage mapping is destroyed and the original page table page containing 4KB mappings that was being held in reserve is deallocated, the pt_page count was not being decremented. Consequentially, the user pt_count would grow over time.

Test Plan

For example, after multiple iterations of "buildworld", I was seeing the following illogical counts:

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

alc requested review of this revision.Dec 5 2021, 6:50 PM
alc created this revision.
This revision is now accepted and ready to land.Dec 5 2021, 6:56 PM
This revision was automatically updated to reflect the committed changes.