diff options
author | attilio <attilio@FreeBSD.org> | 2007-05-31 22:52:15 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2007-05-31 22:52:15 +0000 |
commit | 7dd8ed88a925a943f1963baa072f4b6c6a8c9930 (patch) | |
tree | 10bf0f11ceeb18c6b03947eb85223abbbbf9cc67 /sys/i386 | |
parent | 4681b4098bbf12784d009826b2223ace96a2306b (diff) | |
download | FreeBSD-src-7dd8ed88a925a943f1963baa072f4b6c6a8c9930.zip FreeBSD-src-7dd8ed88a925a943f1963baa072f4b6c6a8c9930.tar.gz |
Revert VMCNT_* operations introduction.
Probabilly, a general approach is not the better solution here, so we should
solve the sched_lock protection problems separately.
Requested by: alc
Approved by: jeff (mentor)
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/machdep.c | 4 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index cc6984e..f9398df 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -247,8 +247,8 @@ cpu_startup(dummy) vm_ksubmap_init(&kmi); printf("avail memory = %ju (%ju MB)\n", - ptoa((uintmax_t)VMCNT_GET(free_count)), - ptoa((uintmax_t)VMCNT_GET(free_count)) / 1048576); + ptoa((uintmax_t)cnt.v_free_count), + ptoa((uintmax_t)cnt.v_free_count) / 1048576); /* * Set up buffers, so they can be used to read disk labels. diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 6a14079..01b2422 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -606,7 +606,7 @@ pmap_init(void) * numbers of pv entries. */ TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); - pv_entry_max = shpgperproc * maxproc + VMCNT_GET(page_count); + pv_entry_max = shpgperproc * maxproc + cnt.v_page_count; TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); pv_entry_max = roundup(pv_entry_max, _NPCPV); pv_entry_high_water = 9 * (pv_entry_max / 10); @@ -1168,7 +1168,7 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free) pmap->pm_pdir[m->pindex] = 0; --pmap->pm_stats.resident_count; - VMCNT_SUB(wire_count, 1); + atomic_subtract_int(&cnt.v_wire_count, 1); /* * Do an invltlb to make the invalidated mapping @@ -1536,7 +1536,7 @@ pmap_release(pmap_t pmap) ("pmap_release: got wrong ptd page")); #endif m->wire_count--; - VMCNT_SUB(wire_count, 1); + atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free_zero(m); } PMAP_LOCK_DESTROY(pmap); |