aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Bruno <sbruno@FreeBSD.org>2014-09-22 05:07:22 +0000
committerSean Bruno <sbruno@FreeBSD.org>2014-09-22 05:07:22 +0000
commit7c51714e0ad7b5009c80b14e6504a6eef9f639e8 (patch)
tree2110a5a3a79a4ec95d23ef3e531a2a9a186d90d3
parentb0737f1a671f880f4ddd49343072ea81fc243fd8 (diff)
downloadsrc-7c51714e0ad7b5009c80b14e6504a6eef9f639e8.tar.gz
src-7c51714e0ad7b5009c80b14e6504a6eef9f639e8.zip
svn revisions r269964 and r269963 seemed to have impaired small memory
footprint systems(32M/64M) and didn't leave enough free memory to load modules when it was setting up page tables that for sizes that are never used on these smallish boards. Set kmem_zmax to PAGE_SIZE on these smaller systems (< 128M) to keep this from happening. Verified on mips32 h/w. PR: 193465 Submitted by: delphij Reviewed by: adrian
Notes
Notes: svn path=/head/; revision=271944
-rw-r--r--sys/kern/kern_malloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index c39f14359bf9..9e29030fb6f0 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -717,6 +717,8 @@ kmeminit(void)
* a given architecture.
*/
mem_size = vm_cnt.v_page_count;
+ if (mem_size <= 32768) /* delphij XXX 128MB */
+ kmem_zmax = PAGE_SIZE;
if (vm_kmem_size_scale < 1)
vm_kmem_size_scale = VM_KMEM_SIZE_SCALE;