From 3e3eb5f45f330435e49bac04ba18cc89f2e1f75a Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 19 Jan 2021 20:34:36 -0500 Subject: [PATCH] arm64, riscv: Set VM_KMEM_SIZE_SCALE to 1 This setting limits the amount of memory that can be allocated to UMA. On systems with a direct map and ample KVA, however, there is no reason for VM_KMEM_SIZE_SCALE to be larger than 1. This appears to have been inherited from the 32-bit ARM platform definitions. Also remove VM_KMEM_SIZE_MIN, which is not needed when VM_KMEM_SIZE_SCALE is defined to be 1.[*] Reviewed by: alc, kp, kib Reported by: alc [*] Submitted by: Klara, Inc. Sponsored by: Ampere Computing Differential Revision: https://reviews.freebsd.org/D28225 --- sys/arm64/include/vmparam.h | 9 +-------- sys/riscv/include/vmparam.h | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index 9b9c406867f..4a90c7711e0 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -201,14 +201,7 @@ * How many physical pages per kmem arena virtual page. */ #ifndef VM_KMEM_SIZE_SCALE -#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 (16 * 1024 * 1024) +#define VM_KMEM_SIZE_SCALE (1) #endif /* diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h index 9580ab3e121..94782da779f 100644 --- a/sys/riscv/include/vmparam.h +++ b/sys/riscv/include/vmparam.h @@ -196,14 +196,7 @@ * How many physical pages per kmem arena virtual page. */ #ifndef VM_KMEM_SIZE_SCALE -#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 (16 * 1024 * 1024) +#define VM_KMEM_SIZE_SCALE (1) #endif /*