git: adc33d3288e5 - main - vm_kern: in unback, init cursor while unlocked
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Apr 2025 16:43:31 UTC
The branch main has been updated by dougm:
URL: https://cgit.FreeBSD.org/src/commit/?id=adc33d3288e59f9f2f6ee5cffe49b0fd57ce0d70
commit adc33d3288e59f9f2f6ee5cffe49b0fd57ce0d70
Author: Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2025-04-15 16:42:06 +0000
Commit: Doug Moore <dougm@FreeBSD.org>
CommitDate: 2025-04-15 16:42:06 +0000
vm_kern: in unback, init cursor while unlocked
In kmem_unback(), take one small bit of code out of the region where
the write lock is held.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49834
---
sys/vm/vm_kern.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c
index 2aa5588a7588..d13dfb1bc953 100644
--- a/sys/vm/vm_kern.c
+++ b/sys/vm/vm_kern.c
@@ -650,8 +650,8 @@ _kmem_unback(vm_object_t object, vm_offset_t addr, vm_size_t size)
pmap_remove(kernel_pmap, addr, addr + size);
offset = addr - VM_MIN_KERNEL_ADDRESS;
end = offset + size;
- VM_OBJECT_WLOCK(object);
vm_page_iter_init(&pages, object);
+ VM_OBJECT_WLOCK(object);
m = vm_radix_iter_lookup(&pages, atop(offset));
domain = vm_page_domain(m);
if (__predict_true((m->oflags & VPO_KMEM_EXEC) == 0))