From f43467241eed9d83b034dba2d2daec13d5b81792 Mon Sep 17 00:00:00 2001 From: John Dyson Date: Wed, 26 Jun 1996 05:05:52 +0000 Subject: [PATCH] When page table pages were removed from process address space, the resident page stats were not being decremented. This mode corrects that problem. --- sys/amd64/amd64/pmap.c | 4 +++- sys/i386/i386/pmap.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 970bd3be93e..d0163551982 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $Id: pmap.c,v 1.106 1996/06/18 01:22:06 bde Exp $ + * $Id: pmap.c,v 1.107 1996/06/25 00:39:21 dyson Exp $ */ /* @@ -612,6 +612,7 @@ pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m) { * unmap the page table page */ pmap->pm_pdir[m->pindex] = 0; + --pmap->pm_stats.resident_count; /* * Do a pmap_update to make the invalidated mapping * take effect immediately. @@ -747,6 +748,7 @@ pmap_release_free_page(pmap, p) * Remove the page table page from the processes address space. */ pde[p->pindex] = 0; + --pmap->pm_stats.resident_count; if (p->hold_count) { int *kvap; diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 970bd3be93e..d0163551982 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $Id: pmap.c,v 1.106 1996/06/18 01:22:06 bde Exp $ + * $Id: pmap.c,v 1.107 1996/06/25 00:39:21 dyson Exp $ */ /* @@ -612,6 +612,7 @@ pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m) { * unmap the page table page */ pmap->pm_pdir[m->pindex] = 0; + --pmap->pm_stats.resident_count; /* * Do a pmap_update to make the invalidated mapping * take effect immediately. @@ -747,6 +748,7 @@ pmap_release_free_page(pmap, p) * Remove the page table page from the processes address space. */ pde[p->pindex] = 0; + --pmap->pm_stats.resident_count; if (p->hold_count) { int *kvap;