Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jul 2025 20:47:27 GMT
From:      Doug Moore <dougm@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 2d6185cf87e8 - main - vm_fault: drop never-true busy_sleep test
Message-ID:  <202507062047.566KlRUl046623@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507062047.566KlRUl046623>