vm_fault: Avoid unnecessary object relocking in vm_fault_copy_entry()
Suggested by: alc Reviewed by: alc, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35485
This commit is contained in:
parent
d0443e2b98
commit
1f88394b7f
@ -2122,7 +2122,6 @@ vm_fault_copy_entry(vm_map_t dst_map, vm_map_t src_map,
|
||||
break;
|
||||
}
|
||||
}
|
||||
VM_OBJECT_WUNLOCK(dst_object);
|
||||
|
||||
/*
|
||||
* Enter it in the pmap. If a wired, copy-on-write
|
||||
@ -2137,15 +2136,15 @@ vm_fault_copy_entry(vm_map_t dst_map, vm_map_t src_map,
|
||||
* backing pages.
|
||||
*/
|
||||
if (vm_page_all_valid(dst_m)) {
|
||||
VM_OBJECT_WUNLOCK(dst_object);
|
||||
pmap_enter(dst_map->pmap, vaddr, dst_m, prot,
|
||||
access | (upgrade ? PMAP_ENTER_WIRED : 0), 0);
|
||||
VM_OBJECT_WLOCK(dst_object);
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark it no longer busy, and put it on the active list.
|
||||
*/
|
||||
VM_OBJECT_WLOCK(dst_object);
|
||||
|
||||
if (upgrade) {
|
||||
if (src_m != dst_m) {
|
||||
vm_page_unwire(src_m, PQ_INACTIVE);
|
||||
|
Loading…
Reference in New Issue
Block a user