Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/vm_reserv.c
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
#include <sys/vmmeter.h> | #include <sys/vmmeter.h> | ||||
#include <sys/smp.h> | #include <sys/smp.h> | ||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <vm/vm_param.h> | #include <vm/vm_param.h> | ||||
#include <vm/vm_object.h> | #include <vm/vm_object.h> | ||||
#include <vm/vm_page.h> | #include <vm/vm_page.h> | ||||
#include <vm/vm_pageout.h> | #include <vm/vm_pageout.h> | ||||
#include <vm/vm_phys.h> | |||||
#include <vm/vm_pagequeue.h> | #include <vm/vm_pagequeue.h> | ||||
#include <vm/vm_phys.h> | |||||
#include <vm/vm_radix.h> | #include <vm/vm_radix.h> | ||||
#include <vm/vm_reserv.h> | #include <vm/vm_reserv.h> | ||||
/* | /* | ||||
* The reservation system supports the speculative allocation of large physical | * The reservation system supports the speculative allocation of large physical | ||||
* pages ("superpages"). Speculative allocation enables the fully automatic | * pages ("superpages"). Speculative allocation enables the fully automatic | ||||
* utilization of superpages by the virtual memory system. In other words, no | * utilization of superpages by the virtual memory system. In other words, no | ||||
* programmatic directives are required to use superpages. | * programmatic directives are required to use superpages. | ||||
▲ Show 20 Lines • Show All 699 Lines • ▼ Show 20 Lines | m = vm_phys_alloc_contig(domain, allocpages, low, high, | ||||
boundary > VM_LEVEL_0_SIZE ? boundary : 0); | boundary > VM_LEVEL_0_SIZE ? boundary : 0); | ||||
vm_domain_free_unlock(vmd); | vm_domain_free_unlock(vmd); | ||||
if (m == NULL) { | if (m == NULL) { | ||||
vm_domain_freecnt_inc(vmd, npages); | vm_domain_freecnt_inc(vmd, npages); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
} else | } else | ||||
return (NULL); | return (NULL); | ||||
KASSERT(vm_phys_domain(m) == domain, | KASSERT(vm_page_domain(m) == domain, | ||||
("vm_reserv_alloc_contig: Page domain does not match requested.")); | ("vm_reserv_alloc_contig: Page domain does not match requested.")); | ||||
/* | /* | ||||
* The allocated physical pages always begin at a reservation | * The allocated physical pages always begin at a reservation | ||||
* boundary, but they do not always end at a reservation boundary. | * boundary, but they do not always end at a reservation boundary. | ||||
* Initialize every reservation that is completely covered by the | * Initialize every reservation that is completely covered by the | ||||
* allocated physical pages. | * allocated physical pages. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 709 Lines • Show Last 20 Lines |