summaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2007-09-15 18:47:02 +0000
committerAlan Cox <alc@FreeBSD.org>2007-09-15 18:47:02 +0000
commit6bce07ae73d2f77cfc9b133727a30ddb5642b033 (patch)
tree3e80f44469adf9c118d276d6774b85e72d19ce96 /sys/amd64
parent4cd457233b0ad1a4cd7dd66600500190d79aeaf7 (diff)
Notes
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/uma_machdep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/amd64/amd64/uma_machdep.c b/sys/amd64/amd64/uma_machdep.c
index 4a35c6727992..132966801533 100644
--- a/sys/amd64/amd64/uma_machdep.c
+++ b/sys/amd64/amd64/uma_machdep.c
@@ -50,9 +50,9 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
*flags = UMA_SLAB_PRIV;
if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT)
- pflags = VM_ALLOC_INTERRUPT;
+ pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED;
else
- pflags = VM_ALLOC_SYSTEM;
+ pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED;
if (wait & M_ZERO)
pflags |= VM_ALLOC_ZERO;
for (;;) {
@@ -82,5 +82,7 @@ uma_small_free(void *mem, int size, u_int8_t flags)
pa = DMAP_TO_PHYS((vm_offset_t)mem);
dump_drop_page(pa);
m = PHYS_TO_VM_PAGE(pa);
+ m->wire_count--;
vm_page_free(m);
+ atomic_subtract_int(&cnt.v_wire_count, 1);
}