Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160538086
D49521.id152702.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D49521.id152702.diff
View Options
Index: sys/vm/vm_fault.c
===================================================================
--- sys/vm/vm_fault.c
+++ sys/vm/vm_fault.c
@@ -2157,10 +2157,9 @@
* with the source object, all of its pages must be dirtied,
* regardless of whether they can be written.
*/
- mpred = (src_object == dst_object) ?
- vm_page_mpred(src_object, src_pindex) : NULL;
- for (vaddr = dst_entry->start, dst_pindex = 0;
- vaddr < dst_entry->end;
+ dst_pindex = (src_object == dst_object) ? src_pindex : 0;
+ mpred = vm_page_mpred(src_object, dst_pindex);
+ for (vaddr = dst_entry->start; vaddr < dst_entry->end;
vaddr += PAGE_SIZE, dst_pindex++, mpred = dst_m) {
again:
/*
@@ -2171,7 +2170,7 @@
if (src_object != dst_object)
VM_OBJECT_RLOCK(src_object);
object = src_object;
- pindex = src_pindex + dst_pindex;
+ pindex = dst_pindex;
while ((src_m = vm_page_lookup(object, pindex)) == NULL &&
(backing_object = object->backing_object) != NULL) {
/*
@@ -2199,14 +2198,14 @@
/*
* Allocate a page in the destination object.
*/
- dst_m = vm_page_alloc_after(dst_object, (src_object ==
- dst_object ? src_pindex : 0) + dst_pindex,
+ dst_m = vm_page_alloc_after(dst_object, dst_pindex,
VM_ALLOC_NORMAL, mpred);
if (dst_m == NULL) {
VM_OBJECT_WUNLOCK(dst_object);
VM_OBJECT_RUNLOCK(object);
vm_wait(dst_object);
VM_OBJECT_WLOCK(dst_object);
+ dst_m = vm_page_mpred(src_object, dst_pindex);
goto again;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 26, 11:21 AM (17 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34355653
Default Alt Text
D49521.id152702.diff (1 KB)
Attached To
Mode
D49521: vm_fault: update page pred after lock rel/acq in copy_entry
Attached
Detach File
Event Timeline
Log In to Comment