From e34a906f74de53c86a21eb162badc22e12d7f5db Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 14 Mar 2009 15:37:19 +0000 Subject: [PATCH] MFamd64 r189785 Update the pmap's resident page count when a page table page is freed in pmap_remove_pde() and pmap_remove_pages(). MFC after: 6 weeks --- sys/i386/i386/pmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 83da70882f7d..7f6900dfade3 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -2442,6 +2442,7 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva, mpte = pmap_lookup_pt_page(pmap, sva); if (mpte != NULL) { pmap_remove_pt_page(pmap, mpte); + pmap->pm_stats.resident_count--; KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pde: pte page wire count error")); mpte->wire_count = 0; @@ -3990,6 +3991,7 @@ pmap_remove_pages(pmap_t pmap) mpte = pmap_lookup_pt_page(pmap, pv->pv_va); if (mpte != NULL) { pmap_remove_pt_page(pmap, mpte); + pmap->pm_stats.resident_count--; KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pages: pte page wire count error")); mpte->wire_count = 0;