From e9a1a12ab4f1f5036c09d9897d27c6610f939131 Mon Sep 17 00:00:00 2001 From: jchandra Date: Fri, 4 Jun 2010 06:35:36 +0000 Subject: Make vm_contig_grow_cache() extern, and use it when vm_phys_alloc_contig() fails to allocate MIPS page table pages. The current usage of VM_WAIT in case of vm_phys_alloc_contig() failure is not correct, because: "There is no guarantee that any of the available free (or cached) pages after the VM_WAIT will fall within the range of suitable physical addresses. Every time this function sleeps and a single page is freed (or cached) by someone else, this function will be reawakened. With a little bad luck, you could spin indefinitely." We also add low and high parameters to vm_contig_grow_cache() and vm_contig_launder() so that we restrict vm_contig_launder() to the range of pages we are interested in. Reported by: alc Reviewed by: alc Approved by: rrs (mentor) --- sys/vm/vm_pageout.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/vm/vm_pageout.h') diff --git a/sys/vm/vm_pageout.h b/sys/vm/vm_pageout.h index 4759dd7..4857c3e 100644 --- a/sys/vm/vm_pageout.h +++ b/sys/vm/vm_pageout.h @@ -105,5 +105,6 @@ boolean_t vm_pageout_fallback_object_lock(vm_page_t, vm_page_t *); int vm_pageout_flush(vm_page_t *, int, int); void vm_pageout_oom(int shortage); boolean_t vm_pageout_page_lock(vm_page_t, vm_page_t *); +void vm_contig_grow_cache(int, vm_paddr_t, vm_paddr_t); #endif #endif /* _VM_VM_PAGEOUT_H_ */ -- cgit v1.1