From bac58593f12df897c6c8cf743760a9c11fe51db5 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Tue, 18 Apr 2006 20:11:00 +0000 Subject: [PATCH] pv_entry_count is more than a statistic. It is used for resource limiting. Do not compile out its counter updates if pv entry stats are turned off. --- sys/amd64/amd64/pmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 2261a25fbf6e..6ff0a28af26c 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1547,7 +1547,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv) PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); - PV_STAT(pv_entry_count--); + pv_entry_count--; pc = pv_to_chunk(pv); idx = pv - &pc->pc_pventry[0]; field = idx / 64; @@ -1588,7 +1588,7 @@ get_pv_entry(pmap_t pmap, int try) PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); PV_STAT(pv_entry_allocs++); - PV_STAT(pv_entry_count++); + pv_entry_count++; if (pv_entry_count > pv_entry_high_water) pagedaemon_wakeup(); pc = TAILQ_FIRST(&pmap->pm_pvchunk); @@ -2777,7 +2777,7 @@ pmap_remove_pages(pmap_t pmap) /* Mark free */ PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); - PV_STAT(pv_entry_count--); + pv_entry_count--; pc->pc_map[field] |= bitmask; m->md.pv_list_count--; TAILQ_REMOVE(&m->md.pv_list, pv, pv_list);