git: b0dd1a604810 - main - vm_page: Don't create a cache zone for the lazyinit freepool
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 11 May 2025 14:52:19 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=b0dd1a604810c1d96f625d7d1d3c8722a4d19db6
commit b0dd1a604810c1d96f625d7d1d3c8722a4d19db6
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-05-09 19:15:27 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-05-11 14:51:44 +0000
vm_page: Don't create a cache zone for the lazyinit freepool
By design, it'll never be used, so there's no sense in allocating memory
for it.
Reviewed by: kib, dougm
Fixes: b16b4c22d2d1 ("vm_page: Implement lazy page initialization")
Differential Revision: https://reviews.freebsd.org/D50275
---
sys/vm/vm_page.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 8e32da5ea610..681846f8c71a 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -215,6 +215,10 @@ vm_page_init_cache_zones(void *dummy __unused)
for (domain = 0; domain < vm_ndomains; domain++) {
vmd = VM_DOMAIN(domain);
for (pool = 0; pool < VM_NFREEPOOL; pool++) {
+#ifdef VM_FREEPOOL_LAZYINIT
+ if (pool == VM_FREEPOOL_LAZYINIT)
+ continue;
+#endif
pgcache = &vmd->vmd_pgcache[pool];
pgcache->domain = domain;
pgcache->pool = pool;