Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Nov 2012 09:09:30 -0600
From:      Ian Lepore <freebsd@damnhippie.dyndns.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r242466 - head/sys/mips/mips
Message-ID:  <1351868970.1120.25.camel@revolution.hippie.lan>
In-Reply-To: <201211020523.qA25N5No052084@svn.freebsd.org>
References:  <201211020523.qA25N5No052084@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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





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