From owner-freebsd-embedded@FreeBSD.ORG Wed May 20 16:35:45 2015 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94CAA58E; Wed, 20 May 2015 16:35:45 +0000 (UTC) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id 79CCB1162; Wed, 20 May 2015 16:35:44 +0000 (UTC) Received: from marvin.lab.vangyzen.net (c-73-147-253-17.hsd1.va.comcast.net [73.147.253.17]) by smtp.vangyzen.net (Postfix) with ESMTPSA id F29C056467; Wed, 20 May 2015 11:35:43 -0500 (CDT) Message-ID: <555CB7F7.5070409@vangyzen.net> Date: Wed, 20 May 2015 12:36:07 -0400 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Adrian Chadd , "freebsd-arch@freebsd.org" , "freebsd-embedded@freebsd.org" Subject: Re: RFC: make UMTX hash table size configurable References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 16:35:45 -0000 Adrian, Good idea. Looks good to me. Eric On 05/20/2015 12:28, Adrian Chadd wrote: > Hi, > > This patch makes the umtx hash table size configurable. It saves ~40k > of footprint from embedded images. > > (I can't seem to get phabricator to create a diff based on a set of > files, rather than the whole tree. Sigh.) > > adrian@lucy-11i386:~/work/freebsd/head-embedded/src % svn diff > sys/kern/ sys/conf/options > Index: sys/kern/kern_umtx.c > =================================================================== > --- sys/kern/kern_umtx.c (revision 282934) > +++ sys/kern/kern_umtx.c (working copy) > @@ -29,7 +29,7 @@ > __FBSDID("$FreeBSD$"); > > #include "opt_compat.h" > -#include "opt_umtx_profiling.h" > +#include "opt_umtx.h" > > #include > #include > @@ -184,7 +184,11 @@ > PRI_MAX_TIMESHARE : (td)->td_user_pri) > > #define GOLDEN_RATIO_PRIME 2654404609U > +#ifdef UMTX_NUM_CHAINS > +#define UMTX_CHAINS UMTX_NUM_CHAINS > +#else > #define UMTX_CHAINS 512 > +#endif /* UMTX_NUM_CHAINS */ > #define UMTX_SHIFTS (__WORD_BIT - 9) > > #define GET_SHARE(flags) \ > Index: sys/conf/options > =================================================================== > --- sys/conf/options (revision 282934) > +++ sys/conf/options (working copy) > @@ -209,7 +209,8 @@ > SYSVSHM opt_sysvipc.h > SW_WATCHDOG opt_watchdog.h > TURNSTILE_PROFILING > -UMTX_PROFILING > +UMTX_PROFILING opt_umtx.h > +UMTX_NUM_CHAINS opt_umtx.h > VFS_AIO > VERBOSE_SYSINIT > WLCACHE opt_wavelan.h > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" >