Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 May 2025 08:20:23 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: 3fe2f81f665b - main - vm_page: reduce iter_reset calls in alloc_domain_iter
Message-ID:  <202505160820.54G8KNfl075463@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=3fe2f81f665b48534f5ef57b6e341d2e3b470c8a

commit 3fe2f81f665b48534f5ef57b6e341d2e3b470c8a
Author:     Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2025-05-16 08:18:02 +0000
Commit:     Doug Moore <dougm@FreeBSD.org>
CommitDate: 2025-05-16 08:18:02 +0000

    vm_page: reduce iter_reset calls in alloc_domain_iter
    
    Where the iterator is reset in all cases now, it actually only needs
    to be reset when ALLOC_WAITFAIL is set.
    
    Reported by:    alc
    Reviewed by:    alc, kib, markj
    Differential Revision:  https://reviews.freebsd.org/D50263
---
 sys/vm/vm_page.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index f80de4eb151f..e4bede5d3be7 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -2139,7 +2139,9 @@ again:
 		/*
 		 * Not allocatable, give up.
 		 */
-		pctrie_iter_reset(pages);
+		(void)vm_domain_alloc_fail(vmd, object, req);
+		if ((req & VM_ALLOC_WAITFAIL) != 0)
+			pctrie_iter_reset(pages);
 		return (NULL);
 	}
 



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