summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_fault.c
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1998-03-01 04:18:54 +0000
committerdyson <dyson@FreeBSD.org>1998-03-01 04:18:54 +0000
commit69e5a1e9f571b8af39e0b507e63b81be43f49634 (patch)
treec798d0618605500d1d7f4999c6d26a20c99e7235 /sys/vm/vm_fault.c
parent8c8a4b1058a64bbc945a9a8c5badfc1ebf7a55c1 (diff)
downloadFreeBSD-src-69e5a1e9f571b8af39e0b507e63b81be43f49634.zip
FreeBSD-src-69e5a1e9f571b8af39e0b507e63b81be43f49634.tar.gz
1) Use a more consistent page wait methodology.
2) Do not unnecessarily force page blocking when paging pages out. 3) Further improve swap pager performance and correctness, including fixing the paging in progress deadlock (except in severe I/O error conditions.) 4) Enable vfs_ioopt=1 as a default. 5) Fix and enable the page prezeroing in SMP mode. All in all, SMP systems especially should show a significant improvement in "snappyness."
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r--sys/vm/vm_fault.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index bb352bc..a986aeb 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -66,7 +66,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_fault.c,v 1.79 1998/02/06 12:14:22 eivind Exp $
+ * $Id: vm_fault.c,v 1.80 1998/02/09 06:11:23 eivind Exp $
*/
/*
@@ -139,6 +139,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags)
vm_page_t marray[VM_FAULT_READ];
int hardfault = 0;
int faultcount;
+ int pagewaitbits;
struct vnode *vp = NULL;
struct proc *p = curproc; /* XXX */
@@ -181,6 +182,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags)
}
+ pagewaitbits = PG_BUSY;
RetryFault:;
faultcount = 0;
@@ -286,7 +288,6 @@ RetryFault:;
/*
* See whether this page is resident
*/
-
while (TRUE) {
if (object->flags & OBJ_DEAD) {
@@ -301,12 +302,12 @@ RetryFault:;
* If the page is being brought in, wait for it and
* then retry.
*/
- if ((m->flags & PG_BUSY) || m->busy) {
+ if ((m->flags & PG_BUSY) || (m->busy && (m->valid & VM_PAGE_BITS_ALL) != VM_PAGE_BITS_ALL)) {
int s;
UNLOCK_THINGS;
s = splvm();
- if (((m->flags & PG_BUSY) || m->busy)) {
+ if ((m->flags & PG_BUSY) || (m->busy && (m->valid & VM_PAGE_BITS_ALL) != VM_PAGE_BITS_ALL)) {
m->flags |= PG_WANTED | PG_REFERENCED;
cnt.v_intrans++;
tsleep(m, PSWP, "vmpfw", 0);
@@ -331,11 +332,11 @@ RetryFault:;
}
m->flags |= PG_BUSY;
-
if (((m->valid & VM_PAGE_BITS_ALL) != VM_PAGE_BITS_ALL) &&
m->object != kernel_object && m->object != kmem_object) {
goto readrest;
}
+
break;
}
if (((object->type != OBJT_DEFAULT) &&
@@ -398,7 +399,7 @@ readrest:
if (mt == NULL || (mt->valid != VM_PAGE_BITS_ALL))
break;
if (mt->busy ||
- (mt->flags & (PG_BUSY|PG_FICTITIOUS)) ||
+ (mt->flags & (PG_BUSY | PG_FICTITIOUS)) ||
mt->hold_count ||
mt->wire_count)
continue;
OpenPOWER on IntegriCloud