Date: Mon, 13 Oct 2025 00:30:14 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: d1cdb4a087e6 - stable/14 - vm_fault: assert that first_m is xbusy Message-ID: <202510130030.59D0UEcH046545@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d1cdb4a087e69e1515a855a928ced8a18f9b75f9 commit d1cdb4a087e69e1515a855a928ced8a18f9b75f9 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2025-08-05 15:46:56 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2025-10-13 00:23:46 +0000 vm_fault: assert that first_m is xbusy (cherry picked from commit a38483fa2b3a26414d3409b12dd35ac406c44cea) --- sys/vm/vm_fault.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index f6e75629864e..aad112a652ed 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1785,6 +1785,11 @@ found: /* * A valid page has been found and busied. The object lock * must no longer be held if the page was busied. + * + * Regardless of the busy state of fs.m, fs.first_m is always + * exclusively busied after the first iteration of the loop + * calling vm_fault_object(). This is an ordering point for + * the parallel faults occuring in on the same page. */ vm_page_assert_busied(fs.m); VM_OBJECT_ASSERT_UNLOCKED(fs.object); @@ -1887,6 +1892,9 @@ found: (*fs.m_hold) = fs.m; vm_page_wire(fs.m); } + + KASSERT(fs.first_object == fs.object || vm_page_xbusied(fs.first_m), + ("first_m must be xbusy")); if (vm_page_xbusied(fs.m)) vm_page_xunbusy(fs.m); else
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510130030.59D0UEcH046545>