160727d8bSWarner Losh /*- 2df8bae1dSRodney W. Grimes * Copyright (c) 1991, 1993 3df8bae1dSRodney W. Grimes * The Regents of the University of California. All rights reserved. 4df8bae1dSRodney W. Grimes * 5df8bae1dSRodney W. Grimes * This code is derived from software contributed to Berkeley by 6df8bae1dSRodney W. Grimes * The Mach Operating System project at Carnegie-Mellon University. 7df8bae1dSRodney W. Grimes * 8df8bae1dSRodney W. Grimes * Redistribution and use in source and binary forms, with or without 9df8bae1dSRodney W. Grimes * modification, are permitted provided that the following conditions 10df8bae1dSRodney W. Grimes * are met: 11df8bae1dSRodney W. Grimes * 1. Redistributions of source code must retain the above copyright 12df8bae1dSRodney W. Grimes * notice, this list of conditions and the following disclaimer. 13df8bae1dSRodney W. Grimes * 2. Redistributions in binary form must reproduce the above copyright 14df8bae1dSRodney W. Grimes * notice, this list of conditions and the following disclaimer in the 15df8bae1dSRodney W. Grimes * documentation and/or other materials provided with the distribution. 16fbbd9655SWarner Losh * 3. Neither the name of the University nor the names of its contributors 17df8bae1dSRodney W. Grimes * may be used to endorse or promote products derived from this software 18df8bae1dSRodney W. Grimes * without specific prior written permission. 19df8bae1dSRodney W. Grimes * 20df8bae1dSRodney W. Grimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21df8bae1dSRodney W. Grimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22df8bae1dSRodney W. Grimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23df8bae1dSRodney W. Grimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24df8bae1dSRodney W. Grimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25df8bae1dSRodney W. Grimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26df8bae1dSRodney W. Grimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27df8bae1dSRodney W. Grimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28df8bae1dSRodney W. Grimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29df8bae1dSRodney W. Grimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30df8bae1dSRodney W. Grimes * SUCH DAMAGE. 31df8bae1dSRodney W. Grimes * 323c4dd356SDavid Greenman * from: @(#)vm_object.h 8.3 (Berkeley) 1/12/94 33df8bae1dSRodney W. Grimes * 34df8bae1dSRodney W. Grimes * 35df8bae1dSRodney W. Grimes * Copyright (c) 1987, 1990 Carnegie-Mellon University. 36df8bae1dSRodney W. Grimes * All rights reserved. 37df8bae1dSRodney W. Grimes * 38df8bae1dSRodney W. Grimes * Authors: Avadis Tevanian, Jr., Michael Wayne Young 39df8bae1dSRodney W. Grimes * 40df8bae1dSRodney W. Grimes * Permission to use, copy, modify and distribute this software and 41df8bae1dSRodney W. Grimes * its documentation is hereby granted, provided that both the copyright 42df8bae1dSRodney W. Grimes * notice and this permission notice appear in all copies of the 43df8bae1dSRodney W. Grimes * software, derivative works or modified versions, and any portions 44df8bae1dSRodney W. Grimes * thereof, and that both notices appear in supporting documentation. 45df8bae1dSRodney W. Grimes * 46df8bae1dSRodney W. Grimes * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 47df8bae1dSRodney W. Grimes * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 48df8bae1dSRodney W. Grimes * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 49df8bae1dSRodney W. Grimes * 50df8bae1dSRodney W. Grimes * Carnegie Mellon requests users of this software to return to 51df8bae1dSRodney W. Grimes * 52df8bae1dSRodney W. Grimes * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 53df8bae1dSRodney W. Grimes * School of Computer Science 54df8bae1dSRodney W. Grimes * Carnegie Mellon University 55df8bae1dSRodney W. Grimes * Pittsburgh PA 15213-3890 56df8bae1dSRodney W. Grimes * 57df8bae1dSRodney W. Grimes * any improvements or extensions that they make and grant Carnegie the 58df8bae1dSRodney W. Grimes * rights to redistribute these changes. 593c4dd356SDavid Greenman * 60c3aac50fSPeter Wemm * $FreeBSD$ 61df8bae1dSRodney W. Grimes */ 62df8bae1dSRodney W. Grimes 63df8bae1dSRodney W. Grimes /* 64df8bae1dSRodney W. Grimes * Virtual memory object module definitions. 65df8bae1dSRodney W. Grimes */ 66df8bae1dSRodney W. Grimes 67df8bae1dSRodney W. Grimes #ifndef _VM_OBJECT_ 68df8bae1dSRodney W. Grimes #define _VM_OBJECT_ 69df8bae1dSRodney W. Grimes 70aad9af2bSBruce Evans #include <sys/queue.h> 714b420d50SAlan Cox #include <sys/_lock.h> 724b420d50SAlan Cox #include <sys/_mutex.h> 73*f425ab8eSKonstantin Belousov #include <sys/_pctrie.h> 7489f6b863SAttilio Rao #include <sys/_rwlock.h> 75b5e8ce9fSBruce Evans 76774d251dSAttilio Rao #include <vm/_vm_radix.h> 77774d251dSAttilio Rao 78df8bae1dSRodney W. Grimes /* 79df8bae1dSRodney W. Grimes * Types defined: 80df8bae1dSRodney W. Grimes * 81df8bae1dSRodney W. Grimes * vm_object_t Virtual memory object. 821c7c3c6aSMatthew Dillon * 8379660d83SAlan Cox * List of locks 8479660d83SAlan Cox * (c) const until freed 8589f6b863SAttilio Rao * (o) per-object lock 86ffdd0c7dSAttilio Rao * (f) free pages queue mutex 8779660d83SAlan Cox * 88df8bae1dSRodney W. Grimes */ 89df8bae1dSRodney W. Grimes 90df8bae1dSRodney W. Grimes struct vm_object { 9189f6b863SAttilio Rao struct rwlock lock; 92e3975643SJake Burkholder TAILQ_ENTRY(vm_object) object_list; /* list of all objects */ 931c500307SAlan Cox LIST_HEAD(, vm_object) shadow_head; /* objects that this is a shadow for */ 941c500307SAlan Cox LIST_ENTRY(vm_object) shadow_list; /* chain of shadow objects */ 95e946b949SAttilio Rao TAILQ_HEAD(respgs, vm_page) memq; /* list of resident pages */ 96774d251dSAttilio Rao struct vm_radix rtree; /* root of the resident page radix trie*/ 976395da54SIan Dowse vm_pindex_t size; /* Object size */ 98c759a3caSAlan Cox int generation; /* generation ID */ 99df8bae1dSRodney W. Grimes int ref_count; /* How many refs?? */ 100de5f6a77SJohn Dyson int shadow_count; /* how many objects that this is a shadow for */ 1013153e878SAlan Cox vm_memattr_t memattr; /* default memory attribute for pages */ 1026877f580SAlan Cox objtype_t type; /* type of pager */ 103a1f6d91cSDavid Greenman u_short flags; /* see below */ 10479660d83SAlan Cox u_short pg_color; /* (c) color of first page in obj */ 1055dda2db9SKonstantin Belousov u_int paging_in_progress; /* Paging (in or out) so don't collapse or destroy */ 106a1f6d91cSDavid Greenman int resident_page_count; /* number of resident pages */ 10724a1cce3SDavid Greenman struct vm_object *backing_object; /* object that I'm a shadow of */ 108a316d390SJohn Dyson vm_ooffset_t backing_object_offset;/* Offset in backing object */ 109e3975643SJake Burkholder TAILQ_ENTRY(vm_object) pager_object_list; /* list of all objects of this pager type */ 1103df92083SAlan Cox LIST_HEAD(, vm_reserv) rvq; /* list of reservations */ 11124a1cce3SDavid Greenman void *handle; 11224a1cce3SDavid Greenman union { 1131c7c3c6aSMatthew Dillon /* 1141c7c3c6aSMatthew Dillon * VNode pager 1151c7c3c6aSMatthew Dillon * 1161c7c3c6aSMatthew Dillon * vnp_size - current size of file 1171c7c3c6aSMatthew Dillon */ 11824a1cce3SDavid Greenman struct { 1191c7c3c6aSMatthew Dillon off_t vnp_size; 12084110e7eSKonstantin Belousov vm_ooffset_t writemappings; 12124a1cce3SDavid Greenman } vnp; 1221c7c3c6aSMatthew Dillon 1231c7c3c6aSMatthew Dillon /* 1241c7c3c6aSMatthew Dillon * Device pager 1251c7c3c6aSMatthew Dillon * 1261c7c3c6aSMatthew Dillon * devp_pglist - list of allocated pages 1271c7c3c6aSMatthew Dillon */ 12824a1cce3SDavid Greenman struct { 129e3975643SJake Burkholder TAILQ_HEAD(, vm_page) devp_pglist; 130286790a7SKonstantin Belousov struct cdev_pager_ops *ops; 13143ab9660SKenneth D. Merry struct cdev *dev; 13224a1cce3SDavid Greenman } devp; 1331c7c3c6aSMatthew Dillon 13424964514SPeter Wemm /* 13501381811SJohn Baldwin * SG pager 13601381811SJohn Baldwin * 13701381811SJohn Baldwin * sgp_pglist - list of allocated pages 13801381811SJohn Baldwin */ 13901381811SJohn Baldwin struct { 14001381811SJohn Baldwin TAILQ_HEAD(, vm_page) sgp_pglist; 14101381811SJohn Baldwin } sgp; 14201381811SJohn Baldwin 14301381811SJohn Baldwin /* 1441c7c3c6aSMatthew Dillon * Swap pager 1451c7c3c6aSMatthew Dillon * 1466f2af3fcSKonstantin Belousov * swp_tmpfs - back-pointer to the tmpfs vnode, 1476f2af3fcSKonstantin Belousov * if any, which uses the vm object 1486f2af3fcSKonstantin Belousov * as backing store. The handle 1496f2af3fcSKonstantin Belousov * cannot be reused for linking, 1506f2af3fcSKonstantin Belousov * because the vnode can be 1516f2af3fcSKonstantin Belousov * reclaimed and recreated, making 1526f2af3fcSKonstantin Belousov * the handle changed and hash-chain 1536f2af3fcSKonstantin Belousov * invalid. 1546f2af3fcSKonstantin Belousov * 155*f425ab8eSKonstantin Belousov * swp_blks - pc-trie of the allocated swap blocks. 156*f425ab8eSKonstantin Belousov * 1571c7c3c6aSMatthew Dillon */ 1582a4895f4SDavid Greenman struct { 1596f2af3fcSKonstantin Belousov void *swp_tmpfs; 160*f425ab8eSKonstantin Belousov struct pctrie swp_blks; 1612a4895f4SDavid Greenman } swp; 16224a1cce3SDavid Greenman } un_pager; 163ef694c1aSEdward Tomasz Napierala struct ucred *cred; 1643364c323SKonstantin Belousov vm_ooffset_t charge; 1651bdbd705SKonstantin Belousov void *umtx_data; 166df8bae1dSRodney W. Grimes }; 1670d94caffSDavid Greenman 168df8bae1dSRodney W. Grimes /* 169df8bae1dSRodney W. Grimes * Flags 170df8bae1dSRodney W. Grimes */ 17128634820SAlan Cox #define OBJ_FICTITIOUS 0x0001 /* (c) contains fictitious pages */ 17228634820SAlan Cox #define OBJ_UNMANAGED 0x0002 /* (c) contains unmanaged pages */ 173c42b43a0SKonstantin Belousov #define OBJ_POPULATE 0x0004 /* pager implements populate() */ 17424a1cce3SDavid Greenman #define OBJ_DEAD 0x0008 /* dead objects (during rundown) */ 17596fb8cf2SJohn Dyson #define OBJ_NOSPLIT 0x0010 /* dont split this object */ 1761bdbd705SKonstantin Belousov #define OBJ_UMTXDEAD 0x0020 /* umtx pshared was terminated */ 177c0503609SDavid Greenman #define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ 1787bbdb843SRuslan Bukin #define OBJ_PG_DTOR 0x0080 /* dont reset object, leave that for dtor */ 17949e3050eSKonstantin Belousov #define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty, only for vnode */ 180f08f7dcaSKonstantin Belousov #define OBJ_TMPFS_NODE 0x0200 /* object belongs to tmpfs VREG node */ 181f40cb1c6SKonstantin Belousov #define OBJ_TMPFS_DIRTY 0x0400 /* dirty tmpfs obj */ 1823df92083SAlan Cox #define OBJ_COLORED 0x1000 /* pg_color is defined */ 183c0877f10SJohn Dyson #define OBJ_ONEMAPPING 0x2000 /* One USE (a single, non-forked) mapping flag */ 18419187819SAlan Cox #define OBJ_DISCONNECTWNT 0x4000 /* disconnect from vnode wanted */ 185f08f7dcaSKonstantin Belousov #define OBJ_TMPFS 0x8000 /* has tmpfs vnode allocated */ 1861efb74fbSJohn Dyson 187987ff181SKonstantin Belousov /* 188987ff181SKonstantin Belousov * Helpers to perform conversion between vm_object page indexes and offsets. 189987ff181SKonstantin Belousov * IDX_TO_OFF() converts an index into an offset. 190987ff181SKonstantin Belousov * OFF_TO_IDX() converts an offset into an index. Since offsets are signed 191987ff181SKonstantin Belousov * by default, the sign propagation in OFF_TO_IDX(), when applied to 192987ff181SKonstantin Belousov * negative offsets, is intentional and returns a vm_object page index 193987ff181SKonstantin Belousov * that cannot be created by a userspace mapping. 194987ff181SKonstantin Belousov * UOFF_TO_IDX() treats the offset as an unsigned value and converts it 195987ff181SKonstantin Belousov * into an index accordingly. Use it only when the full range of offset 196987ff181SKonstantin Belousov * values are allowed. Currently, this only applies to device mappings. 197987ff181SKonstantin Belousov * OBJ_MAX_SIZE specifies the maximum page index corresponding to the 198987ff181SKonstantin Belousov * maximum unsigned offset. 199987ff181SKonstantin Belousov */ 200a316d390SJohn Dyson #define IDX_TO_OFF(idx) (((vm_ooffset_t)(idx)) << PAGE_SHIFT) 201a316d390SJohn Dyson #define OFF_TO_IDX(off) ((vm_pindex_t)(((vm_ooffset_t)(off)) >> PAGE_SHIFT)) 202987ff181SKonstantin Belousov #define UOFF_TO_IDX(off) (((vm_pindex_t)(off)) >> PAGE_SHIFT) 203987ff181SKonstantin Belousov #define OBJ_MAX_SIZE (UOFF_TO_IDX(UINT64_MAX) + 1) 204df8bae1dSRodney W. Grimes 205c4473420SPeter Wemm #ifdef _KERNEL 206b5e8ce9fSBruce Evans 2078f9110f6SJohn Dyson #define OBJPC_SYNC 0x1 /* sync I/O */ 2088f9110f6SJohn Dyson #define OBJPC_INVAL 0x2 /* invalidate */ 20981a06505SAlan Cox #define OBJPC_NOSYNC 0x4 /* skip if VPO_NOSYNC */ 2108f9110f6SJohn Dyson 2116bbee8e2SAlan Cox /* 2126bbee8e2SAlan Cox * The following options are supported by vm_object_page_remove(). 2136bbee8e2SAlan Cox */ 2146bbee8e2SAlan Cox #define OBJPR_CLEANONLY 0x1 /* Don't remove dirty pages. */ 2156bbee8e2SAlan Cox #define OBJPR_NOTMAPPED 0x2 /* Don't unmap pages. */ 2166bbee8e2SAlan Cox 217e3975643SJake Burkholder TAILQ_HEAD(object_q, vm_object); 218df8bae1dSRodney W. Grimes 21928f8db14SBruce Evans extern struct object_q vm_object_list; /* list of allocated objects */ 220a5698387SAlan Cox extern struct mtx vm_object_list_mtx; /* lock for object list and count */ 2210d94caffSDavid Greenman 222cccf11b8SAlan Cox extern struct vm_object kernel_object_store; 223cccf11b8SAlan Cox extern struct vm_object kmem_object_store; 224cccf11b8SAlan Cox 225cccf11b8SAlan Cox #define kernel_object (&kernel_object_store) 226cccf11b8SAlan Cox #define kmem_object (&kmem_object_store) 227df8bae1dSRodney W. Grimes 22889f6b863SAttilio Rao #define VM_OBJECT_ASSERT_LOCKED(object) \ 22989f6b863SAttilio Rao rw_assert(&(object)->lock, RA_LOCKED) 23089f6b863SAttilio Rao #define VM_OBJECT_ASSERT_RLOCKED(object) \ 23189f6b863SAttilio Rao rw_assert(&(object)->lock, RA_RLOCKED) 23289f6b863SAttilio Rao #define VM_OBJECT_ASSERT_WLOCKED(object) \ 23389f6b863SAttilio Rao rw_assert(&(object)->lock, RA_WLOCKED) 234faaf5447SKonstantin Belousov #define VM_OBJECT_ASSERT_UNLOCKED(object) \ 235faaf5447SKonstantin Belousov rw_assert(&(object)->lock, RA_UNLOCKED) 2369af6d512SAttilio Rao #define VM_OBJECT_LOCK_DOWNGRADE(object) \ 2379af6d512SAttilio Rao rw_downgrade(&(object)->lock) 23889f6b863SAttilio Rao #define VM_OBJECT_RLOCK(object) \ 23989f6b863SAttilio Rao rw_rlock(&(object)->lock) 24089f6b863SAttilio Rao #define VM_OBJECT_RUNLOCK(object) \ 24189f6b863SAttilio Rao rw_runlock(&(object)->lock) 2420dde287bSAttilio Rao #define VM_OBJECT_SLEEP(object, wchan, pri, wmesg, timo) \ 24389f6b863SAttilio Rao rw_sleep((wchan), &(object)->lock, (pri), (wmesg), (timo)) 24489f6b863SAttilio Rao #define VM_OBJECT_TRYRLOCK(object) \ 24589f6b863SAttilio Rao rw_try_rlock(&(object)->lock) 24689f6b863SAttilio Rao #define VM_OBJECT_TRYWLOCK(object) \ 24789f6b863SAttilio Rao rw_try_wlock(&(object)->lock) 248faaf5447SKonstantin Belousov #define VM_OBJECT_TRYUPGRADE(object) \ 249faaf5447SKonstantin Belousov rw_try_upgrade(&(object)->lock) 25089f6b863SAttilio Rao #define VM_OBJECT_WLOCK(object) \ 25189f6b863SAttilio Rao rw_wlock(&(object)->lock) 252b0cd2017SGleb Smirnoff #define VM_OBJECT_WOWNED(object) \ 253b0cd2017SGleb Smirnoff rw_wowned(&(object)->lock) 25489f6b863SAttilio Rao #define VM_OBJECT_WUNLOCK(object) \ 25589f6b863SAttilio Rao rw_wunlock(&(object)->lock) 256fdff4160SAlan Cox 2573b9a4cb6SAlan Cox /* 2583b9a4cb6SAlan Cox * The object must be locked or thread private. 2593b9a4cb6SAlan Cox */ 2603b9a4cb6SAlan Cox static __inline void 2613b9a4cb6SAlan Cox vm_object_set_flag(vm_object_t object, u_short bits) 2623b9a4cb6SAlan Cox { 2633b9a4cb6SAlan Cox 2643b9a4cb6SAlan Cox object->flags |= bits; 2653b9a4cb6SAlan Cox } 2663b9a4cb6SAlan Cox 2673d653db0SAlan Cox /* 2683d653db0SAlan Cox * Conditionally set the object's color, which (1) enables the allocation 2693d653db0SAlan Cox * of physical memory reservations for anonymous objects and larger-than- 2703d653db0SAlan Cox * superpage-sized named objects and (2) determines the first page offset 2713d653db0SAlan Cox * within the object at which a reservation may be allocated. In other 2723d653db0SAlan Cox * words, the color determines the alignment of the object with respect 2733d653db0SAlan Cox * to the largest superpage boundary. When mapping named objects, like 2743d653db0SAlan Cox * files or POSIX shared memory objects, the color should be set to zero 2753d653db0SAlan Cox * before a virtual address is selected for the mapping. In contrast, 2763d653db0SAlan Cox * for anonymous objects, the color may be set after the virtual address 2773d653db0SAlan Cox * is selected. 2783d653db0SAlan Cox * 2793d653db0SAlan Cox * The object must be locked. 2803d653db0SAlan Cox */ 2813d653db0SAlan Cox static __inline void 2823d653db0SAlan Cox vm_object_color(vm_object_t object, u_short color) 2833d653db0SAlan Cox { 2843d653db0SAlan Cox 2853d653db0SAlan Cox if ((object->flags & OBJ_COLORED) == 0) { 2863d653db0SAlan Cox object->pg_color = color; 2873d653db0SAlan Cox object->flags |= OBJ_COLORED; 2883d653db0SAlan Cox } 2893d653db0SAlan Cox } 2903d653db0SAlan Cox 2911b40f8c0SMatthew Dillon void vm_object_clear_flag(vm_object_t object, u_short bits); 2921b40f8c0SMatthew Dillon void vm_object_pip_add(vm_object_t object, short i); 2931b40f8c0SMatthew Dillon void vm_object_pip_subtract(vm_object_t object, short i); 2941b40f8c0SMatthew Dillon void vm_object_pip_wakeup(vm_object_t object); 2951b40f8c0SMatthew Dillon void vm_object_pip_wakeupn(vm_object_t object, short i); 2961b40f8c0SMatthew Dillon void vm_object_pip_wait(vm_object_t object, char *waitid); 297069e9bc1SDoug Rabson 2981bdbd705SKonstantin Belousov void umtx_shm_object_init(vm_object_t object); 2991bdbd705SKonstantin Belousov void umtx_shm_object_terminated(vm_object_t object); 3002a339d9eSKonstantin Belousov extern int umtx_shm_vnobj_persistent; 3011bdbd705SKonstantin Belousov 3026395da54SIan Dowse vm_object_t vm_object_allocate (objtype_t, vm_pindex_t); 3033364c323SKonstantin Belousov boolean_t vm_object_coalesce(vm_object_t, vm_ooffset_t, vm_size_t, vm_size_t, 3043364c323SKonstantin Belousov boolean_t); 3051b40f8c0SMatthew Dillon void vm_object_collapse (vm_object_t); 3061b40f8c0SMatthew Dillon void vm_object_deallocate (vm_object_t); 3072ac78f0eSStephan Uphoff void vm_object_destroy (vm_object_t); 3081b40f8c0SMatthew Dillon void vm_object_terminate (vm_object_t); 309245df27cSMatthew Dillon void vm_object_set_writeable_dirty (vm_object_t); 3101b40f8c0SMatthew Dillon void vm_object_init (void); 31192a59946SJohn Baldwin void vm_object_madvise(vm_object_t, vm_pindex_t, vm_pindex_t, int); 312126d6082SKonstantin Belousov boolean_t vm_object_page_clean(vm_object_t object, vm_ooffset_t start, 31317f3095dSAlan Cox vm_ooffset_t end, int flags); 3143138cd36SMark Johnston void vm_object_page_noreuse(vm_object_t object, vm_pindex_t start, 3153138cd36SMark Johnston vm_pindex_t end); 3166bbee8e2SAlan Cox void vm_object_page_remove(vm_object_t object, vm_pindex_t start, 3176bbee8e2SAlan Cox vm_pindex_t end, int options); 318387aabc5SAlan Cox boolean_t vm_object_populate(vm_object_t, vm_pindex_t, vm_pindex_t); 3194de22619SAlan Cox void vm_object_print(long addr, boolean_t have_addr, long count, char *modif); 3201b40f8c0SMatthew Dillon void vm_object_reference (vm_object_t); 321b921a12bSAlan Cox void vm_object_reference_locked(vm_object_t); 3223153e878SAlan Cox int vm_object_set_memattr(vm_object_t object, vm_memattr_t memattr); 3231b40f8c0SMatthew Dillon void vm_object_shadow (vm_object_t *, vm_ooffset_t *, vm_size_t); 324c5aaa06dSAlan Cox void vm_object_split(vm_map_entry_t); 325126d6082SKonstantin Belousov boolean_t vm_object_sync(vm_object_t, vm_ooffset_t, vm_size_t, boolean_t, 326950f8459SAlan Cox boolean_t); 32703462509SAlan Cox void vm_object_unwire(vm_object_t object, vm_ooffset_t offset, 32803462509SAlan Cox vm_size_t length, uint8_t queue); 32963e4c6cdSEric van Gyzen struct vnode *vm_object_vnode(vm_object_t object); 330c4473420SPeter Wemm #endif /* _KERNEL */ 3310d94caffSDavid Greenman 332df8bae1dSRodney W. Grimes #endif /* _VM_OBJECT_ */ 333