aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJohn Dyson <dyson@FreeBSD.org>1997-01-01 04:45:05 +0000
committerJohn Dyson <dyson@FreeBSD.org>1997-01-01 04:45:05 +0000
commit3c018e7214333d0e1e5619149e17a5ae298e37a2 (patch)
tree07d44e1fbe1ed6cd398ee49f2ac064875dfd2eb5 /sys
parentfb16fcb52dee3a97929187c3f3d1a79c39c3073c (diff)
Notes
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 b7adba666c55..acfd2580e6bf 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 02fa49f56c2c..d97044feb695 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 bb51ee2cf5ba..baa376101e52 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 8b20f09c669a..808cc279b755 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;