1174982Salc/*- 2174982Salc * Copyright (c) 2002-2006 Rice University 3177956Salc * Copyright (c) 2007-2008 Alan L. Cox <alc@cs.rice.edu> 4174982Salc * All rights reserved. 5174982Salc * 6174982Salc * This software was developed for the FreeBSD Project by Alan L. Cox, 7174982Salc * Olivier Crameri, Peter Druschel, Sitaram Iyer, and Juan Navarro. 8174982Salc * 9174982Salc * Redistribution and use in source and binary forms, with or without 10174982Salc * modification, are permitted provided that the following conditions 11174982Salc * are met: 12174982Salc * 1. Redistributions of source code must retain the above copyright 13174982Salc * notice, this list of conditions and the following disclaimer. 14174982Salc * 2. Redistributions in binary form must reproduce the above copyright 15174982Salc * notice, this list of conditions and the following disclaimer in the 16174982Salc * documentation and/or other materials provided with the distribution. 17174982Salc * 18174982Salc * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19174982Salc * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20174982Salc * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21174982Salc * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22174982Salc * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23174982Salc * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 24174982Salc * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 25174982Salc * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 26174982Salc * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27174982Salc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY 28174982Salc * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29174982Salc * POSSIBILITY OF SUCH DAMAGE. 30174982Salc * 31174982Salc * $FreeBSD$ 32174982Salc */ 33174982Salc 34174982Salc/* 35174982Salc * Superpage reservation management definitions 36174982Salc */ 37174982Salc 38174982Salc#ifndef _VM_RESERV_H_ 39174982Salc#define _VM_RESERV_H_ 40174982Salc 41174982Salc#ifdef _KERNEL 42174982Salc 43174982Salc#if VM_NRESERVLEVEL > 0 44174982Salc 45228287Salc/* 46228287Salc * The following functions are only to be used by the virtual memory system. 47228287Salc */ 48228287Salcvm_page_t vm_reserv_alloc_contig(vm_object_t object, vm_pindex_t pindex, 49228287Salc u_long npages, vm_paddr_t low, vm_paddr_t high, 50228287Salc u_long alignment, vm_paddr_t boundary); 51250577Salcvm_page_t vm_reserv_alloc_page(vm_object_t object, vm_pindex_t pindex, 52250577Salc vm_page_t mpred); 53174982Salcvoid vm_reserv_break_all(vm_object_t object); 54174982Salcboolean_t vm_reserv_free_page(vm_page_t m); 55174982Salcvoid vm_reserv_init(void); 56174982Salcint vm_reserv_level_iffullpop(vm_page_t m); 57174982Salcboolean_t vm_reserv_reactivate_page(vm_page_t m); 58228287Salcboolean_t vm_reserv_reclaim_contig(u_long npages, vm_paddr_t low, 59226928Salc vm_paddr_t high, u_long alignment, vm_paddr_t boundary); 60177956Salcboolean_t vm_reserv_reclaim_inactive(void); 61174982Salcvoid vm_reserv_rename(vm_page_t m, vm_object_t new_object, 62174982Salc vm_object_t old_object, vm_pindex_t old_object_offset); 63174982Salcvm_paddr_t vm_reserv_startup(vm_offset_t *vaddr, vm_paddr_t end, 64174982Salc vm_paddr_t high_water); 65174982Salc 66174982Salc#endif /* VM_NRESERVLEVEL > 0 */ 67174982Salc#endif /* _KERNEL */ 68174982Salc#endif /* !_VM_RESERV_H_ */ 69