Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Feb 2013 01:22:20 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r246929 - head/sys/arm/include
Message-ID:  <201302180122.r1I1MKMD055755@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Mon Feb 18 01:22:20 2013
New Revision: 246929
URL: http://svnweb.freebsd.org/changeset/base/246929

Log:
  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

Modified:
  head/sys/arm/include/vmparam.h

Modified: head/sys/arm/include/vmparam.h
==============================================================================
--- head/sys/arm/include/vmparam.h	Mon Feb 18 01:14:21 2013	(r246928)
+++ head/sys/arm/include/vmparam.h	Mon Feb 18 01:22:20 2013	(r246929)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302180122.r1I1MKMD055755>