summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.h
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1998-01-06 05:26:17 +0000
committerdyson <dyson@FreeBSD.org>1998-01-06 05:26:17 +0000
commitcb2800cd94015c1a5a07a78ac1299961c8cbfee8 (patch)
tree458fd90f400f25f9120e71fd368963d5190181bb /sys/vm/vm_object.h
parent082257799eb016d17f2ea10684dc8c250c8dce19 (diff)
downloadFreeBSD-src-cb2800cd94015c1a5a07a78ac1299961c8cbfee8.zip
FreeBSD-src-cb2800cd94015c1a5a07a78ac1299961c8cbfee8.tar.gz
Make our v_usecount vnode reference count work identically to the
original BSD code. The association between the vnode and the vm_object no longer includes reference counts. The major difference is that vm_object's are no longer freed gratuitiously from the vnode, and so once an object is created for the vnode, it will last as long as the vnode does. When a vnode object reference count is incremented, then the underlying vnode reference count is incremented also. The two "objects" are now more intimately related, and so the interactions are now much less complex. When vnodes are now normally placed onto the free queue with an object still attached. The rundown of the object happens at vnode rundown time, and happens with exactly the same filesystem semantics of the original VFS code. There is absolutely no need for vnode_pager_uncache and other travesties like that anymore. A side-effect of these changes is that SMP locking should be much simpler, the I/O copyin/copyout optimizations work, NFS should be more ponderable, and further work on layered filesystems should be less frustrating, because of the totally coherent management of the vnode objects and vnodes. Please be careful with your system while running this code, but I would greatly appreciate feedback as soon a reasonably possible.
Diffstat (limited to 'sys/vm/vm_object.h')
-rw-r--r--sys/vm/vm_object.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h
index a13a5bf..ac86c6c 100644
--- a/sys/vm/vm_object.h
+++ b/sys/vm/vm_object.h
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_object.h,v 1.39 1997/12/19 09:03:16 dyson Exp $
+ * $Id: vm_object.h,v 1.40 1997/12/29 00:24:55 dyson Exp $
*/
/*
@@ -122,16 +122,13 @@ struct vm_object {
/*
* Flags
*/
-#define OBJ_CANPERSIST 0x0001 /* allow to persist */
#define OBJ_ACTIVE 0x0004 /* active objects */
#define OBJ_DEAD 0x0008 /* dead objects (during rundown) */
-#define OBJ_PIPWNT 0x0040 /* paging in progress wanted */
+#define OBJ_PIPWNT 0x0040 /* paging in progress wanted */
#define OBJ_WRITEABLE 0x0080 /* object has been made writable */
-#define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty */
+#define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty */
#define OBJ_CLEANING 0x0200
-#define OBJ_VFS_REF 0x0400 /* object is refed by vfs layer */
-#define OBJ_VNODE_GONE 0x0800 /* vnode is gone */
-#define OBJ_OPT 0x1000 /* I/O optimization */
+#define OBJ_OPT 0x1000 /* I/O optimization */
#define OBJ_NORMAL 0x0 /* default behavior */
#define OBJ_SEQUENTIAL 0x1 /* expect sequential accesses */
@@ -170,6 +167,8 @@ boolean_t vm_object_coalesce __P((vm_object_t, vm_pindex_t, vm_size_t, vm_size_t
void vm_object_collapse __P((vm_object_t));
void vm_object_copy __P((vm_object_t, vm_pindex_t, vm_object_t *, vm_pindex_t *, boolean_t *));
void vm_object_deallocate __P((vm_object_t));
+void vm_object_terminate __P((vm_object_t));
+void vm_object_vndeallocate __P((vm_object_t));
void vm_object_init __P((void));
void vm_object_page_clean __P((vm_object_t, vm_pindex_t, vm_pindex_t, boolean_t));
void vm_object_page_remove __P((vm_object_t, vm_pindex_t, vm_pindex_t, boolean_t));
OpenPOWER on IntegriCloud