From owner-svn-src-head@FreeBSD.ORG Fri Nov 2 15:09:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3B3A9D0; Fri, 2 Nov 2012 15:09:34 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id 8EAC18FC14; Fri, 2 Nov 2012 15:09:34 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id qA2F9Xwx089192; Fri, 2 Nov 2012 09:09:33 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id qA2F9VJN008991; Fri, 2 Nov 2012 09:09:31 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: svn commit: r242466 - head/sys/mips/mips From: Ian Lepore To: Adrian Chadd In-Reply-To: <201211020523.qA25N5No052084@svn.freebsd.org> References: <201211020523.qA25N5No052084@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Fri, 02 Nov 2012 09:09:30 -0600 Message-ID: <1351868970.1120.25.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 15:09:34 -0000 On Fri, 2012-11-02 at 05:23 +0000, Adrian Chadd wrote: > Author: adrian > Date: Fri Nov 2 05:23:05 2012 > New Revision: 242466 > URL: http://svn.freebsd.org/changeset/base/242466 > > Log: > Drop this from 500 to 128, to save a little space on memory constrained > platforms. > > Modified: > head/sys/mips/mips/busdma_machdep.c > > Modified: head/sys/mips/mips/busdma_machdep.c > ============================================================================== > --- head/sys/mips/mips/busdma_machdep.c Fri Nov 2 05:22:32 2012 (r242465) > +++ head/sys/mips/mips/busdma_machdep.c Fri Nov 2 05:23:05 2012 (r242466) > @@ -153,7 +153,7 @@ static STAILQ_HEAD(, bus_dmamap) bounce_ > static TAILQ_HEAD(,bus_dmamap) dmamap_freelist = > TAILQ_HEAD_INITIALIZER(dmamap_freelist); > > -#define BUSDMA_STATIC_MAPS 500 > +#define BUSDMA_STATIC_MAPS 128 > static struct bus_dmamap map_pool[BUSDMA_STATIC_MAPS]; > > static struct mtx busdma_mtx; Of course, it doesn't save anything if the system is using more than 128 maps, did you check? When I checked on an arm dreamplug system, there were roughly 1850 maps allocated by time it got to the login prompt (making that local cache of 500 maps completely useless). The patches I posted in arch@ a while back addressed this problem by setting up an uma(9) pool for maps (and pools for busdma buffers). The patches were designed to be easy to incorporate for both arm and mips busdma implementations. -- Ian