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.
This commit is contained in:
John Dyson 1997-01-01 04:45:05 +00:00
parent fb16fcb52d
commit 3c018e7214
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=21157
4 changed files with 15 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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

View File

@ -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;