Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm for platforms which define NKMEMPAGES_MAX_UNLIMITED,...
details: https://anonhg.NetBSD.org/src/rev/8b2981aa72ee
branches: trunk
changeset: 368760:8b2981aa72ee
user: chs <chs%NetBSD.org@localhost>
date: Wed Aug 03 01:52:11 2022 +0000
description:
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.
diffstat:
sys/uvm/uvm_km.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r a91ef1f4fbdf -r 8b2981aa72ee sys/uvm/uvm_km.c
--- a/sys/uvm/uvm_km.c Wed Aug 03 01:38:51 2022 +0000
+++ b/sys/uvm/uvm_km.c Wed Aug 03 01:52:11 2022 +0000
@@ -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 @@
return;
}
+#ifdef NKMEMPAGES_MAX_UNLIMITED
+ npages = physmem;
+#else
+
#if defined(KMSAN)
npages = (physmem / 8);
#elif defined(PMAP_MAP_POOLPAGE)
@@ -234,7 +238,6 @@
npages = (physmem / 3) * 2;
#endif /* defined(PMAP_MAP_POOLPAGE) */
-#ifndef NKMEMPAGES_MAX_UNLIMITED
if (npages > NKMEMPAGES_MAX)
npages = NKMEMPAGES_MAX;
#endif
Home |
Main Index |
Thread Index |
Old Index