git: 3fe539651a4b - stable/13 - vm_fault: Avoid unnecessary object relocking in vm_fault_copy_entry()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 29 Jun 2022 14:40:54 UTC
The branch stable/13 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=3fe539651a4bc8ff6b8e6a2ff5213377cb3f7d88
commit 3fe539651a4bc8ff6b8e6a2ff5213377cb3f7d88
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-06-14 20:37:35 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-06-29 14:12:34 +0000
vm_fault: Avoid unnecessary object relocking in vm_fault_copy_entry()
Suggested by: alc
Reviewed by: alc, kib
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 1f88394b7f35a50507b1faade9e8854f104b563d)
---
sys/vm/vm_fault.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 41346f8635ea..0e155ed1f39d 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -2116,7 +2116,6 @@ again:
break;
}
}
- VM_OBJECT_WUNLOCK(dst_object);
/*
* Enter it in the pmap. If a wired, copy-on-write
@@ -2131,15 +2130,15 @@ again:
* 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);