In vm_object_split(), busy and consequently unbusy the pages only when
swap_pager_copy() is invoked, otherwise there is no reason to do so. This will eliminate the necessity to busy pages most of the times. Sponsored by: EMC / Isilon storage division Reviewed by: alc
This commit is contained in:
parent
2ce303e83d
commit
dfd55c0c7b
@ -1390,7 +1390,8 @@ vm_object_split(vm_map_entry_t entry)
|
||||
vm_page_rename(m, new_object, idx);
|
||||
vm_page_unlock(m);
|
||||
/* page automatically made dirty by rename and cache handled */
|
||||
vm_page_busy(m);
|
||||
if (orig_object->type == OBJT_SWAP)
|
||||
vm_page_busy(m);
|
||||
}
|
||||
if (orig_object->type == OBJT_SWAP) {
|
||||
/*
|
||||
@ -1398,6 +1399,8 @@ vm_object_split(vm_map_entry_t entry)
|
||||
* and new_object's locks are released and reacquired.
|
||||
*/
|
||||
swap_pager_copy(orig_object, new_object, offidxstart, 0);
|
||||
TAILQ_FOREACH(m, &new_object->memq, listq)
|
||||
vm_page_wakeup(m);
|
||||
|
||||
/*
|
||||
* Transfer any cached pages from orig_object to new_object.
|
||||
@ -1413,8 +1416,6 @@ vm_object_split(vm_map_entry_t entry)
|
||||
new_object);
|
||||
}
|
||||
VM_OBJECT_WUNLOCK(orig_object);
|
||||
TAILQ_FOREACH(m, &new_object->memq, listq)
|
||||
vm_page_wakeup(m);
|
||||
VM_OBJECT_WUNLOCK(new_object);
|
||||
entry->object.vm_object = new_object;
|
||||
entry->offset = 0LL;
|
||||
|
Loading…
Reference in New Issue
Block a user