diff options
author | alc <alc@FreeBSD.org> | 2011-11-02 05:42:51 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2011-11-02 05:42:51 +0000 |
commit | 6dbf0412bb20d5223dff1585c838f34acd129b1d (patch) | |
tree | 559c3a0be77070694eddd4d60539eba8fc33c6a2 /sys/mips | |
parent | 1c4c4e955ecb312fef7bda58d15d4a6314d6fd40 (diff) | |
download | FreeBSD-src-6dbf0412bb20d5223dff1585c838f34acd129b1d.zip FreeBSD-src-6dbf0412bb20d5223dff1585c838f34acd129b1d.tar.gz |
Add support for VM_ALLOC_WIRED and VM_ALLOC_ZERO to vm_page_alloc_freelist()
and use these new options in the mips pmap.
Wake up the page daemon in vm_page_alloc_freelist() if the number of free
and cached pages becomes too low.
Tidy up vm_page_alloc_init(). In particular, add a comment about an
important restriction on its use.
Tested by: jchandra@
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/mips/pmap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c index 7da76be..ec0241e 100644 --- a/sys/mips/mips/pmap.c +++ b/sys/mips/mips/pmap.c @@ -1077,7 +1077,8 @@ pmap_alloc_direct_page(unsigned int index, int req) { vm_page_t m; - m = vm_page_alloc_freelist(VM_FREELIST_DIRECT, req); + m = vm_page_alloc_freelist(VM_FREELIST_DIRECT, req | VM_ALLOC_WIRED | + VM_ALLOC_ZERO); if (m == NULL) return (NULL); @@ -1085,8 +1086,6 @@ pmap_alloc_direct_page(unsigned int index, int req) pmap_zero_page(m); m->pindex = index; - atomic_add_int(&cnt.v_wire_count, 1); - m->wire_count = 1; return (m); } |