From d9bed5bee15bbabd48129c8b6b286359b2b159ec Mon Sep 17 00:00:00 2001 From: John Dyson Date: Mon, 23 Feb 1998 07:42:43 +0000 Subject: Try to dynamically size the VM_KMEM_SIZE (but is still able to be overridden in a way identically as before.) I had problems with the system properly handling the number of vnodes when there is alot of system memory, and the default VM_KMEM_SIZE. Two new options "VM_KMEM_SIZE_SCALE" and "VM_KMEM_SIZE_MAX" have been added to support better auto-sizing for systems with greater than 128MB. Add some accouting for vm_zone memory allocations, and provide properly for vm_zone allocations out of the kmem_map. Also move the vm_zone allocation stats to the VM OID tree from the KERN OID tree. --- sys/amd64/include/vmparam.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'sys/amd64/include') diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index 076485041596..4f188d6a65d0 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91 - * $Id: vmparam.h,v 1.27 1997/10/27 00:38:46 jkh Exp $ + * $Id: vmparam.h,v 1.28 1998/02/05 03:31:53 dyson Exp $ */ @@ -117,7 +117,23 @@ /* virtual sizes (bytes) for various kernel submaps */ #ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (32 * 1024 * 1024) +#define VM_KMEM_SIZE (12 * 1024 * 1024) +#endif + +/* + * How many physical pages per KVA page allocated. + * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX) + * is the total KVA space allocated for kmem_map. + */ +#ifndef VM_KMEM_SIZE_SCALE +#define VM_KMEM_SIZE_SCALE (3) +#endif + +/* + * Ceiling on amount of kmem_map kva space. + */ +#ifndef VM_KMEM_SIZE_MAX +#define VM_KMEM_SIZE_MAX (80 * 1024 * 1024) #endif /* initial pagein size of beginning of executable file */ -- cgit v1.3