From 8e2dd9b5e30117e2cab1d46c1cc0c2dfb4b7647e Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 16 May 2014 01:30:30 +0000 Subject: MFC r257854 (discussed with alc@) As of r257209, all architectures have defined VM_KMEM_SIZE_SCALE. In other words, every architecture is now auto-sizing the kmem arena. This revision changes kmeminit() so that the definition of VM_KMEM_SIZE_SCALE becomes mandatory and the definition of VM_KMEM_SIZE becomes optional. Replace or eliminate all existing definitions of VM_KMEM_SIZE. With auto-sizing enabled, VM_KMEM_SIZE effectively became an alternate spelling for VM_KMEM_SIZE_MIN on most architectures. Use VM_KMEM_SIZE_MIN for clarity. --- sys/arm/include/vmparam.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'sys/arm/include') diff --git a/sys/arm/include/vmparam.h b/sys/arm/include/vmparam.h index 010834d..1f3d0d2 100644 --- a/sys/arm/include/vmparam.h +++ b/sys/arm/include/vmparam.h @@ -145,17 +145,22 @@ #define VM_MAX_KERNEL_ADDRESS (vm_max_kernel_address) /* - * Virtual size (bytes) for various kernel submaps. + * How many physical pages per kmem arena virtual page. */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12*1024*1024) -#endif #ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (3) +#define VM_KMEM_SIZE_SCALE (3) +#endif + +/* + * Optional floor (in bytes) on the size of the kmem arena. + */ +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (12 * 1024 * 1024) #endif /* - * Ceiling on the size of the kmem submap: 40% of the kernel map. + * Optional ceiling (in bytes) on the size of the kmem arena: 40% of the + * kernel map. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((vm_max_kernel_address - \ -- cgit v1.1