summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1997-01-01 04:45:05 +0000
committerdyson <dyson@FreeBSD.org>1997-01-01 04:45:05 +0000
commit3bb329572750ee99856d41fccb4e6e31378796bb (patch)
tree07d44e1fbe1ed6cd398ee49f2ac064875dfd2eb5 /sys
parent6f6bb8520fe6d1320bddacbdf08046e8634d0f3d (diff)
downloadFreeBSD-src-3bb329572750ee99856d41fccb4e6e31378796bb.zip
FreeBSD-src-3bb329572750ee99856d41fccb4e6e31378796bb.tar.gz
Guess what? We left alot of the old collapse code that is not needed
anymore with the "full" collapse fix that we added about 1yr ago!!! The code has been removed by optioning it out for now, so we can put it back in ASAP if any problems are found.
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_fault.c4
-rw-r--r--sys/vm/vm_map.c2
-rw-r--r--sys/vm/vm_object.c6
-rw-r--r--sys/vm/vm_pageout.c5
4 files changed, 15 insertions, 2 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index b7adba6..acfd258 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.59 1996/12/14 17:54:13 dyson Exp $
+ * $Id: vm_fault.c,v 1.60 1996/12/29 02:33:12 dyson Exp $
*/
/*
@@ -701,6 +701,7 @@ readrest:
object = first_object;
pindex = first_pindex;
+#if defined(OLD_COLLAPSE_CODE)
/*
* Now that we've gotten the copy out of the way,
* let's try to collapse the top object.
@@ -711,6 +712,7 @@ readrest:
vm_object_pip_wakeup(object);
vm_object_collapse(object);
object->paging_in_progress++;
+#endif
} else {
prot &= ~VM_PROT_WRITE;
}
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 02fa49f..d97044f 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -2084,10 +2084,12 @@ vm_map_copy_entry(src_map, dst_map, src_entry, dst_entry)
* Make a copy of the object.
*/
if (src_entry->object.vm_object) {
+#if defined(OLD_COLLAPSE_CODE)
if ((src_entry->object.vm_object->handle == NULL) &&
(src_entry->object.vm_object->type == OBJT_DEFAULT ||
src_entry->object.vm_object->type == OBJT_SWAP))
vm_object_collapse(src_entry->object.vm_object);
+#endif
++src_entry->object.vm_object->ref_count;
src_entry->copy_on_write = TRUE;
src_entry->needs_copy = TRUE;
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index bb51ee2..baa3761 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -793,6 +793,7 @@ vm_object_shadow(object, offset, length)
}
+#if defined(OLD_COLLAPSE_CODE)
/*
* this version of collapse allows the operation to occur earlier and
* when paging_in_progress is true for an object... This is not a complete
@@ -860,6 +861,7 @@ vm_object_qcollapse(object)
}
backing_object->ref_count -= 2;
}
+#endif
/*
* vm_object_collapse:
@@ -912,7 +914,9 @@ vm_object_collapse(object)
if (object->paging_in_progress != 0 ||
backing_object->paging_in_progress != 0) {
+#if defined(OLD_COLLAPSE_CODE)
vm_object_qcollapse(object);
+#endif
return;
}
@@ -1288,10 +1292,12 @@ vm_object_coalesce(prev_object, prev_pindex, prev_size, next_size)
return (FALSE);
}
+#if defined(OLD_COLLAPSE_CODE)
/*
* Try to collapse the object first
*/
vm_object_collapse(prev_object);
+#endif
/*
* Can't coalesce if: . more than one reference . paged out . shadows
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 8b20f09..808cc27 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -65,7 +65,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_pageout.c,v 1.86 1996/09/28 03:33:40 dyson Exp $
+ * $Id: vm_pageout.c,v 1.87 1996/11/28 23:15:06 dyson Exp $
*/
/*
@@ -215,12 +215,15 @@ vm_pageout_clean(m, sync)
((m->busy != 0) || (m->flags & PG_BUSY)))
return 0;
+#if defined(OLD_COLLAPSE_CODE)
/*
* Try collapsing before it's too late.
*/
if (!sync && object->backing_object) {
vm_object_collapse(object);
}
+#endif
+
mc[vm_pageout_page_count] = m;
pageout_count = 1;
page_base = vm_pageout_page_count;
OpenPOWER on IntegriCloud