Remove unnecessary page protects on map_split and collapse operations.
Fix bug where an object's OBJ_WRITEABLE/OBJ_MIGHTBEDIRTY flags do not get set under certain circumstances ( page rename case ). Reviewed by: Alan Cox <alc@cs.rice.edu>, John Dyson
This commit is contained in:
parent
bf18286593
commit
d1bf5d56b6
@ -61,7 +61,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: vm_map.c,v 1.150 1999/02/19 03:11:37 dillon Exp $
|
||||
* $Id: vm_map.c,v 1.151 1999/02/19 14:25:36 luoqi Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -2162,12 +2162,14 @@ vm_map_split(entry)
|
||||
/*
|
||||
* We must wait for pending I/O to complete before we can
|
||||
* rename the page.
|
||||
*
|
||||
* We do not have to VM_PROT_NONE the page as mappings should
|
||||
* not be changed by this operation.
|
||||
*/
|
||||
if (vm_page_sleep_busy(m, TRUE, "spltwt"))
|
||||
goto retry;
|
||||
|
||||
vm_page_busy(m);
|
||||
vm_page_protect(m, VM_PROT_NONE);
|
||||
vm_page_rename(m, new_object, idx);
|
||||
/* page automatically made dirty by rename and cache handled */
|
||||
vm_page_busy(m);
|
||||
|
@ -61,7 +61,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: vm_object.c,v 1.150 1999/02/12 20:42:19 dillon Exp $
|
||||
* $Id: vm_object.c,v 1.151 1999/02/15 02:03:40 dillon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1086,11 +1086,12 @@ vm_object_backing_scan(vm_object_t object, int op)
|
||||
/*
|
||||
* Page does not exist in parent, rename the
|
||||
* page from the backing object to the main object.
|
||||
*
|
||||
* If the page was mapped to a process, it can remain
|
||||
* mapped through the rename.
|
||||
*/
|
||||
if ((p->queue - p->pc) == PQ_CACHE)
|
||||
vm_page_deactivate(p);
|
||||
else
|
||||
vm_page_protect(p, VM_PROT_NONE);
|
||||
|
||||
vm_page_rename(p, object, new_pindex);
|
||||
/* page automatically made dirty by rename */
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
|
||||
* $Id: vm_page.c,v 1.125 1999/02/08 00:37:35 dillon Exp $
|
||||
* $Id: vm_page.c,v 1.126 1999/02/15 06:52:14 dillon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -425,6 +425,13 @@ vm_page_insert(m, object, pindex)
|
||||
*/
|
||||
|
||||
object->resident_page_count++;
|
||||
|
||||
/*
|
||||
* Since we are inserting a new and possibly dirty page,
|
||||
* update the object's OBJ_WRITEABLE and OBJ_MIGHTBEDIRTY flags.
|
||||
*/
|
||||
if (m->flags & PG_WRITEABLE)
|
||||
vm_object_set_flag(object, OBJ_WRITEABLE|OBJ_MIGHTBEDIRTY);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user