summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_fault.c
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1996-07-28 01:14:01 +0000
committerdyson <dyson@FreeBSD.org>1996-07-28 01:14:01 +0000
commitb8f642e489dd767f1b1c305a42921ec37286b78b (patch)
treedd6e9347e39406d78b7cbe4962fa3c70ac0dbe26 /sys/vm/vm_fault.c
parent4efa60cee22db3c8145632aed7b859e52c91b81b (diff)
downloadFreeBSD-src-b8f642e489dd767f1b1c305a42921ec37286b78b.zip
FreeBSD-src-b8f642e489dd767f1b1c305a42921ec37286b78b.tar.gz
Undo part of the scalability commit. Many of the changes
in vm_fault had some performance enhancements not ready for prime time. This commit backs out some of the changes.
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r--sys/vm/vm_fault.c44
1 files changed, 15 insertions, 29 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index df2f0aa..66965d4 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.53 1996/07/02 02:07:59 dyson Exp $
+ * $Id: vm_fault.c,v 1.54 1996/07/27 03:23:52 dyson Exp $
*/
/*
@@ -293,7 +293,8 @@ RetryFault:;
m->flags |= PG_BUSY;
- if (((m->valid & VM_PAGE_BITS_ALL) != VM_PAGE_BITS_ALL) &&
+ if (m->valid &&
+ ((m->valid & VM_PAGE_BITS_ALL) != VM_PAGE_BITS_ALL) &&
m->object != kernel_object && m->object != kmem_object) {
goto readrest;
}
@@ -396,17 +397,19 @@ readrest:
if (rv == VM_PAGER_OK) {
/*
+ * Found the page. Leave it busy while we play
+ * with it.
+ */
+
+ /*
* Relookup in case pager changed page. Pager
* is responsible for disposition of old page
* if moved.
*/
- if ((m->object != object) || (m->pindex != pindex) ||
- (m->flags & PG_TABLED) == 0) {
- m = vm_page_lookup(object, pindex);
- if( !m) {
- UNLOCK_AND_DEALLOCATE;
- goto RetryFault;
- }
+ m = vm_page_lookup(object, pindex);
+ if( !m) {
+ UNLOCK_AND_DEALLOCATE;
+ goto RetryFault;
}
hardfault++;
@@ -478,26 +481,9 @@ readrest:
}
first_m = NULL;
- if ((m->flags & PG_ZERO) == 0) {
- if (vm_page_zero_count) {
- vm_page_protect(m, VM_PROT_NONE);
- PAGE_WAKEUP(m);
- vm_page_free(m);
- m = vm_page_alloc(object, pindex, VM_ALLOC_ZERO);
- if (!m)
- panic("vm_fault: missing zero page");
- /*
- * This should not be true, but just in case...
- */
- if ((m->flags & PG_ZERO) == 0) {
- vm_page_zero_fill(m);
- cnt.v_zfod++;
- }
- } else {
- vm_page_zero_fill(m);
- cnt.v_zfod++;
- }
- }
+ if ((m->flags & PG_ZERO) == 0)
+ vm_page_zero_fill(m);
+ cnt.v_zfod++;
break;
} else {
if (object != first_object) {
OpenPOWER on IntegriCloud