Module Name: src Committed By: chs Date: Wed Aug 3 01:52:11 UTC 2022
Modified Files: src/sys/uvm: uvm_km.c Log Message: for platforms which define NKMEMPAGES_MAX_UNLIMITED, set nkmempages high enough to allow the kernel to map all of RAM into kmem, so that free physical pages rather than kernel virtual space is the limiting factor in allocating kernel memory. this gives ZFS more flexibility in tuning how much memory to use for its ARC cache. To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/sys/uvm/uvm_km.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_km.c diff -u src/sys/uvm/uvm_km.c:1.160 src/sys/uvm/uvm_km.c:1.161 --- src/sys/uvm/uvm_km.c:1.160 Sat Mar 13 15:29:55 2021 +++ src/sys/uvm/uvm_km.c Wed Aug 3 01:52:11 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_km.c,v 1.160 2021/03/13 15:29:55 skrll Exp $ */ +/* $NetBSD: uvm_km.c,v 1.161 2022/08/03 01:52:11 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -152,7 +152,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.160 2021/03/13 15:29:55 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.161 2022/08/03 01:52:11 chs Exp $"); #include "opt_uvmhist.h" @@ -226,6 +226,10 @@ kmeminit_nkmempages(void) return; } +#ifdef NKMEMPAGES_MAX_UNLIMITED + npages = physmem; +#else + #if defined(KMSAN) npages = (physmem / 8); #elif defined(PMAP_MAP_POOLPAGE) @@ -234,7 +238,6 @@ kmeminit_nkmempages(void) npages = (physmem / 3) * 2; #endif /* defined(PMAP_MAP_POOLPAGE) */ -#ifndef NKMEMPAGES_MAX_UNLIMITED if (npages > NKMEMPAGES_MAX) npages = NKMEMPAGES_MAX; #endif