diff options
author | alc <alc@FreeBSD.org> | 2013-02-18 01:22:20 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2013-02-18 01:22:20 +0000 |
commit | dd08c86f5040edcd8c6ed0b426d278e4856e77c3 (patch) | |
tree | a853cef7bbff81071ab56067abd1bac43b64d42c | |
parent | 4089ecb7c42a8e9c11685445988c855136006c68 (diff) | |
download | FreeBSD-src-dd08c86f5040edcd8c6ed0b426d278e4856e77c3.zip FreeBSD-src-dd08c86f5040edcd8c6ed0b426d278e4856e77c3.tar.gz |
Place a cap on the size of the kernel's heap, also known as the kmem
submap. Otherwise, after r246204, the auto-scaling logic in kern_malloc.c
tries to create a kmem submap that consumes the entire kernel map on a
Pandaboard with 1 GB of RAM.
Tested by: gonzo
-rw-r--r-- | sys/arm/include/vmparam.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/arm/include/vmparam.h b/sys/arm/include/vmparam.h index 50c575b..94caeef 100644 --- a/sys/arm/include/vmparam.h +++ b/sys/arm/include/vmparam.h @@ -145,6 +145,14 @@ #define VM_KMEM_SIZE_SCALE (2) #endif +/* + * Ceiling on the size of the kmem submap: 60% of the kernel map. + */ +#ifndef VM_KMEM_SIZE_MAX +#define VM_KMEM_SIZE_MAX ((vm_max_kernel_address - \ + VM_MIN_KERNEL_ADDRESS + 1) * 3 / 5) +#endif + #define MAXTSIZ (16*1024*1024) #ifndef DFLDSIZ #define DFLDSIZ (128*1024*1024) |