git: 2d6185cf87e8 - main - vm_fault: drop never-true busy_sleep test
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 06 Jul 2025 20:47:27 UTC
The branch main has been updated by dougm:
URL: https://cgit.FreeBSD.org/src/commit/?id=2d6185cf87e815d4951a9ddcf5c535ebd07a8815
commit 2d6185cf87e815d4951a9ddcf5c535ebd07a8815
Author: Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2025-07-06 20:46:00 +0000
Commit: Doug Moore <dougm@FreeBSD.org>
CommitDate: 2025-07-06 20:46:00 +0000
vm_fault: drop never-true busy_sleep test
vm_fault_busy_sleep() tests to see whether the page fs->m matches the
value looked up at fs->pindex. At that point, a lock is held on
fs->object, and it has been held since before vm_fault_object() also
looked up fs->pindex in fs->object and stored the result in fs->m. So
the values must match, and the test is not necessary. Drop it.
Reviewed by: alc, markj
Differential Revision: https://reviews.freebsd.org/D51179
---
sys/vm/vm_fault.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 21584abacfa3..3e57e8d4f1d0 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -1441,8 +1441,7 @@ vm_fault_busy_sleep(struct faultstate *fs)
}
vm_object_pip_wakeup(fs->object);
vm_fault_unlock_map(fs);
- if (fs->m != vm_page_lookup(fs->object, fs->pindex) ||
- !vm_page_busy_sleep(fs->m, "vmpfw", 0))
+ if (!vm_page_busy_sleep(fs->m, "vmpfw", 0))
VM_OBJECT_UNLOCK(fs->object);
VM_CNT_INC(v_intrans);
vm_object_deallocate(fs->first_object);