summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.h
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-01-09 16:06:02 +0000
committerdg <dg@FreeBSD.org>1995-01-09 16:06:02 +0000
commit1707d41102ca7d645ec2db9e442a27857337d7e9 (patch)
treeafd2f1c13b93c3fff08b58c44153df0d13479824 /sys/vm/vm_map.h
parent08ff911ba0fc8f893be057ca25d8b941f6d0f276 (diff)
downloadFreeBSD-src-1707d41102ca7d645ec2db9e442a27857337d7e9.zip
FreeBSD-src-1707d41102ca7d645ec2db9e442a27857337d7e9.tar.gz
These changes embody the support of the fully coherent merged VM buffer cache,
much higher filesystem I/O performance, and much better paging performance. It represents the culmination of over 6 months of R&D. The majority of the merged VM/cache work is by John Dyson. The following highlights the most significant changes. Additionally, there are (mostly minor) changes to the various filesystem modules (nfs, msdosfs, etc) to support the new VM/buffer scheme. vfs_bio.c: Significant rewrite of most of vfs_bio to support the merged VM buffer cache scheme. The scheme is almost fully compatible with the old filesystem interface. Significant improvement in the number of opportunities for write clustering. vfs_cluster.c, vfs_subr.c Upgrade and performance enhancements in vfs layer code to support merged VM/buffer cache. Fixup of vfs_cluster to eliminate the bogus pagemove stuff. vm_object.c: Yet more improvements in the collapse code. Elimination of some windows that can cause list corruption. vm_pageout.c: Fixed it, it really works better now. Somehow in 2.0, some "enhancements" broke the code. This code has been reworked from the ground-up. vm_fault.c, vm_page.c, pmap.c, vm_object.c Support for small-block filesystems with merged VM/buffer cache scheme. pmap.c vm_map.c Dynamic kernel VM size, now we dont have to pre-allocate excessive numbers of kernel PTs. vm_glue.c Much simpler and more effective swapping code. No more gratuitous swapping. proc.h Fixed the problem that the p_lock flag was not being cleared on a fork. swap_pager.c, vnode_pager.c Removal of old vfs_bio cruft to support the past pseudo-coherency. Now the code doesn't need it anymore. machdep.c Changes to better support the parameter values for the merged VM/buffer cache scheme. machdep.c, kern_exec.c, vm_glue.c Implemented a seperate submap for temporary exec string space and another one to contain process upages. This eliminates all map fragmentation problems that previously existed. ffs_inode.c, ufs_inode.c, ufs_readwrite.c Changes for merged VM/buffer cache. Add "bypass" support for sneaking in on busy buffers. Submitted by: John Dyson and David Greenman
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r--sys/vm/vm_map.h160
1 files changed, 73 insertions, 87 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index 4f5b645..c940e8a 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -40,17 +40,17 @@
* All rights reserved.
*
* Authors: Avadis Tevanian, Jr., Michael Wayne Young
- *
+ *
* Permission to use, copy, modify and distribute this software and
* its documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
* FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id$
+ * $Id: vm_map.h,v 1.3 1994/08/02 07:55:26 davidg Exp $
*/
/*
@@ -86,9 +86,9 @@
*/
union vm_map_object {
- struct vm_object *vm_object; /* object object */
- struct vm_map *share_map; /* share map */
- struct vm_map *sub_map; /* belongs to another map */
+ struct vm_object *vm_object; /* object object */
+ struct vm_map *share_map; /* share map */
+ struct vm_map *sub_map; /* belongs to another map */
};
/*
@@ -98,22 +98,22 @@ union vm_map_object {
* Also included is control information for virtual copy operations.
*/
struct vm_map_entry {
- struct vm_map_entry *prev; /* previous entry */
- struct vm_map_entry *next; /* next entry */
- vm_offset_t start; /* start address */
- vm_offset_t end; /* end address */
- union vm_map_object object; /* object I point to */
- vm_offset_t offset; /* offset into object */
- boolean_t is_a_map:1, /* Is "object" a map? */
- is_sub_map:1, /* Is "object" a submap? */
- /* Only in sharing maps: */
- copy_on_write:1,/* is data copy-on-write */
- needs_copy:1; /* does object need to be copied */
- /* Only in task maps: */
- vm_prot_t protection; /* protection code */
- vm_prot_t max_protection; /* maximum protection */
- vm_inherit_t inheritance; /* inheritance */
- int wired_count; /* can be paged if = 0 */
+ struct vm_map_entry *prev; /* previous entry */
+ struct vm_map_entry *next; /* next entry */
+ vm_offset_t start; /* start address */
+ vm_offset_t end; /* end address */
+ union vm_map_object object; /* object I point to */
+ vm_offset_t offset; /* offset into object */
+ boolean_t is_a_map:1, /* Is "object" a map? */
+ is_sub_map:1, /* Is "object" a submap? */
+ /* Only in sharing maps: */
+ copy_on_write:1, /* is data copy-on-write */
+ needs_copy:1; /* does object need to be copied */
+ /* Only in task maps: */
+ vm_prot_t protection; /* protection code */
+ vm_prot_t max_protection; /* maximum protection */
+ vm_inherit_t inheritance; /* inheritance */
+ int wired_count; /* can be paged if = 0 */
};
/*
@@ -123,19 +123,19 @@ struct vm_map_entry {
* insertion, or removal.
*/
struct vm_map {
- struct pmap * pmap; /* Physical map */
- lock_data_t lock; /* Lock for map data */
- struct vm_map_entry header; /* List of entries */
- int nentries; /* Number of entries */
- vm_size_t size; /* virtual size */
- boolean_t is_main_map; /* Am I a main map? */
- int ref_count; /* Reference count */
- simple_lock_data_t ref_lock; /* Lock for ref_count field */
- vm_map_entry_t hint; /* hint for quick lookups */
- simple_lock_data_t hint_lock; /* lock for hint storage */
- vm_map_entry_t first_free; /* First free space hint */
- boolean_t entries_pageable; /* map entries pageable?? */
- unsigned int timestamp; /* Version number */
+ struct pmap *pmap; /* Physical map */
+ lock_data_t lock; /* Lock for map data */
+ struct vm_map_entry header; /* List of entries */
+ int nentries; /* Number of entries */
+ vm_size_t size; /* virtual size */
+ boolean_t is_main_map; /* Am I a main map? */
+ int ref_count; /* Reference count */
+ simple_lock_data_t ref_lock; /* Lock for ref_count field */
+ vm_map_entry_t hint; /* hint for quick lookups */
+ simple_lock_data_t hint_lock; /* lock for hint storage */
+ vm_map_entry_t first_free; /* First free space hint */
+ boolean_t entries_pageable; /* map entries pageable?? */
+ unsigned int timestamp; /* Version number */
#define min_offset header.start
#define max_offset header.end
};
@@ -150,9 +150,9 @@ struct vm_map {
* does not include a reference for the imbedded share_map.]
*/
typedef struct {
- int main_timestamp;
- vm_map_t share_map;
- int share_timestamp;
+ int main_timestamp;
+ vm_map_t share_map;
+ int share_timestamp;
} vm_map_version_t;
/*
@@ -181,50 +181,36 @@ typedef struct {
#define MAX_KMAPENT 128
#ifdef KERNEL
-boolean_t vm_map_check_protection __P((vm_map_t,
- vm_offset_t, vm_offset_t, vm_prot_t));
-int vm_map_copy __P((vm_map_t, vm_map_t, vm_offset_t,
- vm_size_t, vm_offset_t, boolean_t, boolean_t));
-void vm_map_copy_entry __P((vm_map_t,
- vm_map_t, vm_map_entry_t, vm_map_entry_t));
+boolean_t vm_map_check_protection __P((vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t));
+int vm_map_copy __P((vm_map_t, vm_map_t, vm_offset_t, vm_size_t, vm_offset_t, boolean_t, boolean_t));
+void vm_map_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t));
struct pmap;
-vm_map_t vm_map_create __P((struct pmap *,
- vm_offset_t, vm_offset_t, boolean_t));
-void vm_map_deallocate __P((vm_map_t));
-int vm_map_delete __P((vm_map_t, vm_offset_t, vm_offset_t));
-vm_map_entry_t vm_map_entry_create __P((vm_map_t));
-void vm_map_entry_delete __P((vm_map_t, vm_map_entry_t));
-void vm_map_entry_dispose __P((vm_map_t, vm_map_entry_t));
-void vm_map_entry_unwire __P((vm_map_t, vm_map_entry_t));
-int vm_map_find __P((vm_map_t, vm_object_t,
- vm_offset_t, vm_offset_t *, vm_size_t, boolean_t));
-int vm_map_findspace __P((vm_map_t,
- vm_offset_t, vm_size_t, vm_offset_t *));
-int vm_map_inherit __P((vm_map_t,
- vm_offset_t, vm_offset_t, vm_inherit_t));
-void vm_map_init __P((struct vm_map *,
- vm_offset_t, vm_offset_t, boolean_t));
-int vm_map_insert __P((vm_map_t,
- vm_object_t, vm_offset_t, vm_offset_t, vm_offset_t));
-int vm_map_lookup __P((vm_map_t *, vm_offset_t, vm_prot_t,
- vm_map_entry_t *, vm_object_t *, vm_offset_t *, vm_prot_t *,
- boolean_t *, boolean_t *));
-void vm_map_lookup_done __P((vm_map_t, vm_map_entry_t));
-boolean_t vm_map_lookup_entry __P((vm_map_t,
- vm_offset_t, vm_map_entry_t *));
-int vm_map_pageable __P((vm_map_t,
- vm_offset_t, vm_offset_t, boolean_t));
-int vm_map_clean __P((vm_map_t,
- vm_offset_t, vm_offset_t, boolean_t, boolean_t));
-void vm_map_print __P((vm_map_t, boolean_t));
-int vm_map_protect __P((vm_map_t,
- vm_offset_t, vm_offset_t, vm_prot_t, boolean_t));
-void vm_map_reference __P((vm_map_t));
-int vm_map_remove __P((vm_map_t, vm_offset_t, vm_offset_t));
-void vm_map_simplify __P((vm_map_t, vm_offset_t));
-void vm_map_simplify_entry __P((vm_map_t, vm_map_entry_t));
-void vm_map_startup __P((void));
-int vm_map_submap __P((vm_map_t,
- vm_offset_t, vm_offset_t, vm_map_t));
+vm_map_t vm_map_create __P((struct pmap *, vm_offset_t, vm_offset_t, boolean_t));
+void vm_map_deallocate __P((vm_map_t));
+int vm_map_delete __P((vm_map_t, vm_offset_t, vm_offset_t));
+vm_map_entry_t vm_map_entry_create __P((vm_map_t));
+void vm_map_entry_delete __P((vm_map_t, vm_map_entry_t));
+void vm_map_entry_dispose __P((vm_map_t, vm_map_entry_t));
+void vm_map_entry_unwire __P((vm_map_t, vm_map_entry_t));
+int vm_map_find __P((vm_map_t, vm_object_t, vm_offset_t, vm_offset_t *, vm_size_t, boolean_t));
+int vm_map_findspace __P((vm_map_t, vm_offset_t, vm_size_t, vm_offset_t *));
+int vm_map_inherit __P((vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t));
+void vm_map_init __P((struct vm_map *, vm_offset_t, vm_offset_t, boolean_t));
+int vm_map_insert __P((vm_map_t, vm_object_t, vm_offset_t, vm_offset_t, vm_offset_t));
+int vm_map_lookup __P((vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *,
+ vm_offset_t *, vm_prot_t *, boolean_t *, boolean_t *));
+void vm_map_lookup_done __P((vm_map_t, vm_map_entry_t));
+boolean_t vm_map_lookup_entry __P((vm_map_t, vm_offset_t, vm_map_entry_t *));
+int vm_map_pageable __P((vm_map_t, vm_offset_t, vm_offset_t, boolean_t));
+int vm_map_clean __P((vm_map_t, vm_offset_t, vm_offset_t, boolean_t, boolean_t));
+void vm_map_print __P((vm_map_t, boolean_t));
+int vm_map_protect __P((vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t));
+void vm_map_reference __P((vm_map_t));
+int vm_map_remove __P((vm_map_t, vm_offset_t, vm_offset_t));
+void vm_map_simplify __P((vm_map_t, vm_offset_t));
+void vm_map_simplify_entry __P((vm_map_t, vm_map_entry_t));
+void vm_map_startup __P((void));
+int vm_map_submap __P((vm_map_t, vm_offset_t, vm_offset_t, vm_map_t));
+
#endif
-#endif /* _VM_MAP_ */
+#endif /* _VM_MAP_ */
OpenPOWER on IntegriCloud