From owner-svn-src-all@FreeBSD.ORG Fri Feb 1 17:52:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 08C4181F; Fri, 1 Feb 2013 17:52:14 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh2.mail.rice.edu (mh2.mail.rice.edu [128.42.201.21]) by mx1.freebsd.org (Postfix) with ESMTP id C4EC13FD; Fri, 1 Feb 2013 17:52:13 +0000 (UTC) Received: from mh2.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh2.mail.rice.edu (Postfix) with ESMTP id F145A500123; Fri, 1 Feb 2013 11:52:12 -0600 (CST) Received: from mh2.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh2.mail.rice.edu (Postfix) with ESMTP id F01BB50011D; Fri, 1 Feb 2013 11:52:12 -0600 (CST) X-Virus-Scanned: by amavis-2.7.0 at mh2.mail.rice.edu, auth channel Received: from mh2.mail.rice.edu ([127.0.0.1]) by mh2.mail.rice.edu (mh2.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id ztzTpOBD-ig8; Fri, 1 Feb 2013 11:52:12 -0600 (CST) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh2.mail.rice.edu (Postfix) with ESMTPSA id 6DE8A500100; Fri, 1 Feb 2013 11:52:12 -0600 (CST) Message-ID: <510C00CB.8000409@rice.edu> Date: Fri, 01 Feb 2013 11:52:11 -0600 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/20130127 Thunderbird/17.0.2 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r246204 - head/sys/arm/include References: <201302011026.r11AQVL9068427@svn.freebsd.org> In-Reply-To: <201302011026.r11AQVL9068427@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2013 17:52:14 -0000 On 02/01/2013 04:26, Andre Oppermann wrote: > Author: andre > Date: Fri Feb 1 10:26:31 2013 > New Revision: 246204 > URL: http://svnweb.freebsd.org/changeset/base/246204 > > Log: > Add VM_KMEM_SIZE_SCALE parameter set to 2 (50%) for all ARM platforms. > > VM_KMEM_SIZE_SCALE specifies which fraction of the available physical > memory, after deduction of the kernel itself and other early statically > allocated memory, can be used for the kmem_map. The kmem_map provides > for all UMA/malloc allocations in KVM space. > Not always. Off the top of my head, two things immediately come to mind: 9KB and 16KB jumbo frames come from the kernel map, because we allocate physically contiguous memory for them, and some swap metadata also comes from the kernel map. Yes, all "ordinary" heap allocations come from the kmem map, but a number of things that are special for one reason or another don't. > Previously ARM was using a fixed kmem_map size of (12*1024*1024) = 12MB > without regard to effectively available memory. This is too small for > recent ARM SoC with more than 128MB of RAM. > > For reference a description of others related kmem_map parameters: > > VM_KMEM_SIZE default start size of kmem_map if SCALE is > not defined > VM_KMEM_SIZE_MIN hard floor on the kmem_map size > VM_KMEM_SIZE_MAX hard ceiling on the kmem_map size > VM_KMEM_SIZE_SCALE fraction of the available real memory to > be used for the kmem_map, limited by the > MIN and MAX parameters. > > Tested by: ian > MFC after: 1 week > > Modified: > head/sys/arm/include/vmparam.h > > Modified: head/sys/arm/include/vmparam.h > ============================================================================== > --- head/sys/arm/include/vmparam.h Fri Feb 1 10:00:21 2013 (r246203) > +++ head/sys/arm/include/vmparam.h Fri Feb 1 10:26:31 2013 (r246204) > @@ -134,12 +134,15 @@ > #endif > > #define VM_MAX_KERNEL_ADDRESS 0xffffffff > + > /* > * Virtual size (bytes) for various kernel submaps. > */ > - > #ifndef VM_KMEM_SIZE > -#define VM_KMEM_SIZE (12*1024*1024) > +#define VM_KMEM_SIZE (12*1024*1024) > +#endif > +#ifndef VM_KMEM_SIZE_SCALE > +#define VM_KMEM_SIZE_SCALE (2) > #endif > > #define MAXTSIZ (16*1024*1024) >