diff options
author | alc <alc@FreeBSD.org> | 2011-12-05 18:29:25 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2011-12-05 18:29:25 +0000 |
commit | a8855af4c0d2c4374763f3e58b930b60da8a1fa4 (patch) | |
tree | 169ae815456d0b52e73adc8ac35eff5e095e269b /sys/vm/vm_reserv.h | |
parent | f47c7431dec003c1c26fce8811c39d1b1db72967 (diff) | |
download | FreeBSD-src-a8855af4c0d2c4374763f3e58b930b60da8a1fa4.zip FreeBSD-src-a8855af4c0d2c4374763f3e58b930b60da8a1fa4.tar.gz |
Introduce vm_reserv_alloc_contig() and teach vm_page_alloc_contig() how to
use superpage reservations. So, for the first time, kernel virtual memory
that is allocated by contigmalloc(), kmem_alloc_attr(), and
kmem_alloc_contig() can be promoted to superpages. In fact, even a series
of small contigmalloc() allocations may collectively result in a promoted
superpage.
Eliminate some duplication of code in vm_reserv_alloc_page().
Change the type of vm_reserv_reclaim_contig()'s first parameter in order
that it be consistent with other vm_*_contig() functions.
Tested by: marius (sparc64)
Diffstat (limited to 'sys/vm/vm_reserv.h')
-rw-r--r-- | sys/vm/vm_reserv.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/vm/vm_reserv.h b/sys/vm/vm_reserv.h index 9ab9568..a2b6647 100644 --- a/sys/vm/vm_reserv.h +++ b/sys/vm/vm_reserv.h @@ -42,13 +42,19 @@ #if VM_NRESERVLEVEL > 0 +/* + * The following functions are only to be used by the virtual memory system. + */ +vm_page_t vm_reserv_alloc_contig(vm_object_t object, vm_pindex_t pindex, + u_long npages, vm_paddr_t low, vm_paddr_t high, + u_long alignment, vm_paddr_t boundary); vm_page_t vm_reserv_alloc_page(vm_object_t object, vm_pindex_t pindex); void vm_reserv_break_all(vm_object_t object); boolean_t vm_reserv_free_page(vm_page_t m); void vm_reserv_init(void); int vm_reserv_level_iffullpop(vm_page_t m); boolean_t vm_reserv_reactivate_page(vm_page_t m); -boolean_t vm_reserv_reclaim_contig(vm_paddr_t size, vm_paddr_t low, +boolean_t vm_reserv_reclaim_contig(u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary); boolean_t vm_reserv_reclaim_inactive(void); void vm_reserv_rename(vm_page_t m, vm_object_t new_object, |