summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_anon.h
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2007-06-18 21:51:16 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2007-06-18 21:51:16 +0000
commitdc46e8536c2f17c3b742ea1dff7f43e4bbfe2592 (patch)
tree7fd9064a9c683518bc0af027bacce6e3e49d4faa /sys/uvm/uvm_anon.h
parent249e2ac24d76981290d9280d321ecd7ecbdeb0d4 (diff)
Bring back Mickey's UVM anon change. Testing by thib@, beck@ and
ckuethe@ for a while. Okay beck@, "it is good timing" deraadt@.
Diffstat (limited to 'sys/uvm/uvm_anon.h')
-rw-r--r--sys/uvm/uvm_anon.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/sys/uvm/uvm_anon.h b/sys/uvm/uvm_anon.h
index 551802048bf..a454b5572c6 100644
--- a/sys/uvm/uvm_anon.h
+++ b/sys/uvm/uvm_anon.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_anon.h,v 1.13 2006/07/13 22:51:26 deraadt Exp $ */
+/* $OpenBSD: uvm_anon.h,v 1.14 2007/06/18 21:51:15 pedro Exp $ */
/* $NetBSD: uvm_anon.h,v 1.13 2000/12/27 09:17:04 chs Exp $ */
/*
@@ -49,24 +49,19 @@
*/
struct vm_anon {
+ struct vm_page *an_page; /* if in RAM [an_lock] */
int an_ref; /* reference count [an_lock] */
- simple_lock_data_t an_lock; /* lock for an_ref */
- union {
- struct vm_anon *an_nxt; /* if on free list [afreelock] */
- struct vm_page *an_page;/* if in RAM [an_lock] */
- } u;
int an_swslot; /* drum swap slot # (if != 0)
[an_lock. also, it is ok to read
an_swslot if we hold an_page PG_BUSY] */
+ simple_lock_data_t an_lock; /* lock for an_ref */
};
/*
- * a pool of vm_anon data structures is allocated and put on a global
- * free list at boot time. vm_anon's on the free list use "an_nxt" as
- * a pointer to the next item on the free list. for active vm_anon's
- * the data can be in one of the following state: [1] in a vm_page
- * with no backing store allocated yet, [2] in a vm_page with backing
- * store allocated, or [3] paged out to backing store (no vm_page).
+ * for active vm_anon's the data can be in one of the following state:
+ * [1] in a vm_page with no backing store allocated yet, [2] in a vm_page
+ * with backing store allocated, or [3] paged out to backing store
+ * (no vm_page).
*
* for pageout in case [2]: if the page has been modified then we must
* flush it out to backing store, otherwise we can just dump the
@@ -102,11 +97,9 @@ struct vm_aref {
struct vm_anon *uvm_analloc(void);
void uvm_anfree(struct vm_anon *);
void uvm_anon_init(void);
-int uvm_anon_add(int);
-void uvm_anon_remove(int);
struct vm_page *uvm_anon_lockloanpg(struct vm_anon *);
void uvm_anon_dropswap(struct vm_anon *);
-boolean_t anon_swap_off(int, int);
+boolean_t uvm_anon_pagein(struct vm_anon *);
#endif /* _KERNEL */
#endif /* _UVM_UVM_ANON_H_ */