summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.h
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-09-17 04:56:40 +0000
committerdillon <dillon@FreeBSD.org>1999-09-17 04:56:40 +0000
commit4cb1921c9b97c10844176bdd697e070b4af7e717 (patch)
treef570abee242d756236804e1630a4d34162994241 /sys/vm/vm_page.h
parent2600195b6aa16ae0dd89bbb61802b1058238e31e (diff)
downloadFreeBSD-src-4cb1921c9b97c10844176bdd697e070b4af7e717.zip
FreeBSD-src-4cb1921c9b97c10844176bdd697e070b4af7e717.tar.gz
Reviewed by: Alan Cox <alc@cs.rice.edu>, David Greenman <dg@root.com>
Replace various VM related page count calculations strewn over the VM code with inlines to aid in readability and to reduce fragility in the code where modules depend on the same test being performed to properly sleep and wakeup. Split out a portion of the page deactivation code into an inline in vm_page.c to support vm_page_dontneed(). add vm_page_dontneed(), which handles the madvise MADV_DONTNEED feature in a related commit coming up for vm_map.c/vm_object.c. This code prevents degenerate cases where an essentially active page may be rotated through a subset of the paging lists, resulting in premature disposal.
Diffstat (limited to 'sys/vm/vm_page.h')
-rw-r--r--sys/vm/vm_page.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h
index 6ffb867..2d7e740 100644
--- a/sys/vm/vm_page.h
+++ b/sys/vm/vm_page.h
@@ -136,7 +136,8 @@ struct vm_page {
};
/*
- * note SWAPBLK_NONE is a flag, basically the high bit.
+ * note: currently use SWAPBLK_NONE as an absolute value rather then
+ * a flag bit.
*/
#define SWAPBLK_MASK ((daddr_t)((u_daddr_t)-1 >> 1)) /* mask */
@@ -391,6 +392,7 @@ void vm_page_activate __P((vm_page_t));
vm_page_t vm_page_alloc __P((vm_object_t, vm_pindex_t, int));
vm_page_t vm_page_grab __P((vm_object_t, vm_pindex_t, int));
void vm_page_cache __P((register vm_page_t));
+void vm_page_dontneed __P((register vm_page_t));
static __inline void vm_page_copy __P((vm_page_t, vm_page_t));
static __inline void vm_page_free __P((vm_page_t));
static __inline void vm_page_free_zero __P((vm_page_t));
OpenPOWER on IntegriCloud