[Midnightbsd-cvs] src [8316] trunk/sys/vm/vm_fault.c: dirty the newly copied anonymous pages after the wired region is forked.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Sep 17 18:35:21 EDT 2016
Revision: 8316
http://svnweb.midnightbsd.org/src/?rev=8316
Author: laffer1
Date: 2016-09-17 18:35:21 -0400 (Sat, 17 Sep 2016)
Log Message:
-----------
dirty the newly copied anonymous pages after the wired region is forked.
Modified Paths:
--------------
trunk/sys/vm/vm_fault.c
Modified: trunk/sys/vm/vm_fault.c
===================================================================
--- trunk/sys/vm/vm_fault.c 2016-09-17 22:33:45 UTC (rev 8315)
+++ trunk/sys/vm/vm_fault.c 2016-09-17 22:35:21 UTC (rev 8316)
@@ -1308,9 +1308,13 @@
access &= ~VM_PROT_WRITE;
/*
- * Loop through all of the pages in the entry's range, copying each
- * one from the source object (it should be there) to the destination
- * object.
+ * Loop through all of the virtual pages within the entry's
+ * range, copying each page from the source object to the
+ * destination object. Since the source is wired, those pages
+ * must exist. In contrast, the destination is pageable.
+ * Since the destination object does share any backing storage
+ * with the source object, all of its pages must be dirtied,
+ * regardless of whether they can be written.
*/
for (vaddr = dst_entry->start, dst_pindex = 0;
vaddr < dst_entry->end;
@@ -1353,6 +1357,7 @@
pmap_copy_page(src_m, dst_m);
VM_OBJECT_UNLOCK(object);
dst_m->valid = VM_PAGE_BITS_ALL;
+ dst_m->dirty = VM_PAGE_BITS_ALL;
VM_OBJECT_UNLOCK(dst_object);
/*
More information about the Midnightbsd-cvs
mailing list