git: 3fe2f81f665b - main - vm_page: reduce iter_reset calls in alloc_domain_iter
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 16 May 2025 08:20:23 UTC
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);
}