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/sun4v | |
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/sun4v')
-rw-r--r-- | sys/sun4v/sun4v/machdep.c | 4 | ||||
-rw-r--r-- | sys/sun4v/sun4v/pmap.c | 6 | ||||
-rw-r--r-- | sys/sun4v/sun4v/tsb.c | 2 | ||||
-rw-r--r-- | sys/sun4v/sun4v/tte_hash.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/sys/sun4v/sun4v/machdep.c b/sys/sun4v/sun4v/machdep.c index 728a503..9039ca9 100644 --- a/sys/sun4v/sun4v/machdep.c +++ b/sys/sun4v/sun4v/machdep.c @@ -233,8 +233,8 @@ cpu_startup(void *arg) EVENTHANDLER_REGISTER(shutdown_final, sparc64_shutdown_final, NULL, SHUTDOWN_PRI_LAST); - printf("avail memory = %lu (%lu MB)\n", VMCNT_GET(free_count) * - PAGE_SIZE, VMCNT_GET(free_count) / ((1024 * 1024) / PAGE_SIZE)); + printf("avail memory = %lu (%lu MB)\n", cnt.v_free_count * PAGE_SIZE, + cnt.v_free_count / ((1024 * 1024) / PAGE_SIZE)); if (bootverbose) printf("machine: %s\n", sparc64_model); diff --git a/sys/sun4v/sun4v/pmap.c b/sys/sun4v/sun4v/pmap.c index 9f80247..f2fa3ea 100644 --- a/sys/sun4v/sun4v/pmap.c +++ b/sys/sun4v/sun4v/pmap.c @@ -973,7 +973,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, * way below the low water mark of free pages or way * above high water mark of used pv entries. */ - if (VMCNT_GET(free_count) < VMCNT_GET(free_reserved) || + if (cnt.v_free_count < cnt.v_free_reserved || pv_entry_count > pv_entry_high_water) return; @@ -1316,7 +1316,7 @@ pmap_free_contig_pages(void *ptr, int npages) m = PHYS_TO_VM_PAGE(TLB_DIRECT_TO_PHYS((vm_offset_t)ptr)); for (i = 0; i < npages; i++, m++) { m->wire_count--; - VMCNT_SUB(wire_count, 1); + atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free(m); } } @@ -1347,7 +1347,7 @@ pmap_init(void) pvzone = uma_zcreate("PV ENTRY", sizeof(struct pv_entry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); 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_high_water = 9 * (pv_entry_max / 10); uma_zone_set_obj(pvzone, &pvzone_obj, pv_entry_max); diff --git a/sys/sun4v/sun4v/tsb.c b/sys/sun4v/sun4v/tsb.c index a317583..7ea8d04 100644 --- a/sys/sun4v/sun4v/tsb.c +++ b/sys/sun4v/sun4v/tsb.c @@ -104,7 +104,7 @@ tsb_deinit(hv_tsb_info_t *hvtsb) m = PHYS_TO_VM_PAGE((vm_paddr_t)hvtsb->hti_ra); for (i = 0, tm = m; i < TSB_SIZE; i++, m++) { tm->wire_count--; - VMCNT_SUB(wire_count, 1); + atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free(tm); } } diff --git a/sys/sun4v/sun4v/tte_hash.c b/sys/sun4v/sun4v/tte_hash.c index ca507f7..a60185e 100644 --- a/sys/sun4v/sun4v/tte_hash.c +++ b/sys/sun4v/sun4v/tte_hash.c @@ -231,7 +231,7 @@ free_fragment_pages(void *ptr) for (fh = ptr; fh != NULL; fh = fh->thf_head.fh_next) { m = PHYS_TO_VM_PAGE(TLB_DIRECT_TO_PHYS((vm_offset_t)fh)); m->wire_count--; - VMCNT_SUB(wire_count, 1); + atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free(m); } } |