summaryrefslogtreecommitdiffstats
path: root/sys/i386/include
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/i386/include
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/i386/include')
-rw-r--r--sys/i386/include/pmap.h44
-rw-r--r--sys/i386/include/vmparam.h6
2 files changed, 46 insertions, 4 deletions
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h
index b83628a..190b8dd 100644
--- a/sys/i386/include/pmap.h
+++ b/sys/i386/include/pmap.h
@@ -42,7 +42,7 @@
*
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
- * $Id: pmap.h,v 1.18 1994/11/14 14:12:24 bde Exp $
+ * $Id: pmap.h,v 1.19 1994/12/18 03:11:46 davidg Exp $
*/
#ifndef _MACHINE_PMAP_H_
@@ -62,7 +62,11 @@ typedef unsigned int *pt_entry_t;
* given to the user (NUPDE)
*/
#ifndef NKPT
+#if 0
#define NKPT 26 /* actual number of kernel page tables */
+#else
+#define NKPT 9 /* actual number of kernel page tables */
+#endif
#endif
#ifndef NKPDE
#define NKPDE 63 /* addressable number of page tables/pde's */
@@ -126,6 +130,43 @@ pmap_kextract(vm_offset_t va)
pa = (pa & PG_FRAME) | (va & ~PG_FRAME);
return pa;
}
+
+/*
+ * pmap_is_referenced:
+ *
+ * Return whether or not the specified physical page was referenced
+ * by any physical maps.
+ */
+#define pmap_is_referenced(pa) pmap_testbit((pa), PG_U)
+
+/*
+ * pmap_is_modified:
+ *
+ * Return whether or not the specified physical page was modified
+ * in any physical maps.
+ */
+#define pmap_is_modified(pa) pmap_testbit((pa), PG_M)
+
+/*
+ * Clear the modify bits on the specified physical page.
+ */
+#define pmap_clear_modify(pa) pmap_changebit((pa), PG_M, FALSE)
+
+/*
+ * pmap_clear_reference:
+ *
+ * Clear the reference bit on the specified physical page.
+ */
+#define pmap_clear_reference(pa) pmap_changebit((pa), PG_U, FALSE)
+
+/*
+ * Routine: pmap_copy_on_write
+ * Function:
+ * Remove write privileges from all
+ * physical maps for this physical page.
+ */
+#define pmap_copy_on_write(pa) pmap_changebit((pa), PG_RW, FALSE)
+
#endif
/*
@@ -196,6 +237,7 @@ pv_entry_t pv_table; /* array of entries, one per page */
struct pcb;
void pmap_activate __P((pmap_t, struct pcb *));
+void pmap_changebit __P((vm_offset_t, int, boolean_t));
pmap_t pmap_kernel __P((void));
boolean_t pmap_page_exists __P((pmap_t, vm_offset_t));
pt_entry_t *pmap_pte(pmap_t, vm_offset_t);
diff --git a/sys/i386/include/vmparam.h b/sys/i386/include/vmparam.h
index 482ee5b..b38e914 100644
--- a/sys/i386/include/vmparam.h
+++ b/sys/i386/include/vmparam.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91
- * $Id: vmparam.h,v 1.15 1994/09/12 11:38:20 davidg Exp $
+ * $Id: vmparam.h,v 1.16 1994/09/23 07:00:12 davidg Exp $
*/
@@ -124,11 +124,11 @@
#define UPDT VM_MIN_KERNEL_ADDRESS
#define KPT_MIN_ADDRESS ((vm_offset_t)KERNBASE - NBPG*(NKPDE+1))
#define KPT_MAX_ADDRESS ((vm_offset_t)KERNBASE - NBPG)
-#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)KERNBASE + NKPT*NBPG*NPTEPG)
+#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)KERNBASE + NKPDE*NBPG*NPTEPG)
/* virtual sizes (bytes) for various kernel submaps */
#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
-#define VM_KMEM_SIZE (16 * 1024 * 1024)
+#define VM_KMEM_SIZE (32 * 1024 * 1024)
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
#endif /* _MACHINE_VMPARAM_H_ */
OpenPOWER on IntegriCloud