diff options
author | attilio <attilio@FreeBSD.org> | 2007-06-10 21:59:14 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2007-06-10 21:59:14 +0000 |
commit | e9fc4edc4441a4cdc380539f97a90207de0cd092 (patch) | |
tree | 5076d8c3c653c4deb666bc72dcf20bf604e5fb6e /sys/vm/vm_page.c | |
parent | 445024c7ff4986844b8675e79a722921503413dc (diff) | |
download | FreeBSD-src-e9fc4edc4441a4cdc380539f97a90207de0cd092.zip FreeBSD-src-e9fc4edc4441a4cdc380539f97a90207de0cd092.tar.gz |
Optimize vmmeter locking.
In particular:
- Add an explicative table for locking of struct vmmeter members
- Apply new rules for some of those members
- Remove some unuseful comments
Heavily reviewed by: alc, bde, jeff
Approved by: jeff (mentor)
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r-- | sys/vm/vm_page.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 263ee05..e1ef640 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1045,7 +1045,7 @@ vm_page_activate(vm_page_t m) mtx_assert(&vm_page_queue_mtx, MA_OWNED); if (VM_PAGE_GETKNOWNQUEUE2(m) != PQ_ACTIVE) { if (VM_PAGE_INQUEUE1(m, PQ_CACHE)) - PCPU_INC(cnt.v_reactivated); + cnt.v_reactivated++; vm_pageq_remove(m); if (m->wire_count == 0 && (m->flags & PG_UNMANAGED) == 0) { if (m->act_count < ACT_INIT) @@ -1286,7 +1286,7 @@ _vm_page_deactivate(vm_page_t m, int athead) return; if (m->wire_count == 0 && (m->flags & PG_UNMANAGED) == 0) { if (VM_PAGE_INQUEUE1(m, PQ_CACHE)) - PCPU_INC(cnt.v_reactivated); + cnt.v_reactivated++; vm_page_flag_clear(m, PG_WINATCFLS); vm_pageq_remove(m); if (athead) @@ -1295,11 +1295,6 @@ _vm_page_deactivate(vm_page_t m, int athead) TAILQ_INSERT_TAIL(&vm_page_queues[PQ_INACTIVE].pl, m, pageq); VM_PAGE_SETQUEUE2(m, PQ_INACTIVE); vm_page_queues[PQ_INACTIVE].lcnt++; - - /* - * Just not use an atomic here since vm_page_queues_lock - * alredy protects this field. - */ cnt.v_inactive_count++; } } |