diff options
-rw-r--r-- | sys/vm/vm_map.c | 6 | ||||
-rw-r--r-- | sys/vm/vm_object.c | 7 | ||||
-rw-r--r-- | sys/vm/vm_page.c | 9 |
3 files changed, 16 insertions, 6 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index cbb59cf..05c8c5c 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -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); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 686cf35..ea3b49c 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -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 */ diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 7cda5b4..a2e3a83 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -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); } /* |