From owner-cvs-src@FreeBSD.ORG Tue Aug 22 14:16:59 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 31F2A16A4DE; Tue, 22 Aug 2006 14:16:59 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC3E743D6B; Tue, 22 Aug 2006 14:16:54 +0000 (GMT) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.13.6/8.13.6) with ESMTP id k7MEGrc3029908; Tue, 22 Aug 2006 18:16:53 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Tue, 22 Aug 2006 18:16:53 +0400 (MSD) From: Dmitry Morozovsky To: Kris Kennaway In-Reply-To: <20060822094426.GA48626@xor.obsecurity.org> Message-ID: <20060822181126.N27449@woozle.rinet.ru> References: <200608211506.k7LF6cJH001832@repoman.freebsd.org> <1DE9D506-0C4B-4CE7-8944-DC4C8AE640C7@opensail.org> <20060822094353.GB48419@xor.obsecurity.org> <20060822094426.GA48626@xor.obsecurity.org> X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (woozle.rinet.ru [0.0.0.0]); Tue, 22 Aug 2006 18:16:53 +0400 (MSD) Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Florent Thoumie , cvs-all@freebsd.org, Wes Peters Subject: Re: cvs commit: src/share/man/man5 rc.conf.5 src/etc/rc.d Makefile mdconfig mdconfig2 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Aug 2006 14:16:59 -0000 On Tue, 22 Aug 2006, Kris Kennaway wrote: KK> > > > Use should be as easy as: KK> > > > KK> > > > mdconfig_md0="-t malloc -s 10m" KK> > KK> > We should consider adding "-o reserve" to malloc-backed md creation KK> > where applicable (e.g. the md-backed /tmp creation) to avoid bogus PRs KK> > from people who run their kernels out of memory by filling up /tmp. KK> KK> Oops, I forgot they were already (correctly) fixed to use swap backing KK> (I think). Not yet, the default is still -M. I had a patch for this, based on vm.nswapdev value, to use malloc-backed md only on swapless machines: Index: rc.subr =================================================================== RCS file: /home/ncvs/src/etc/rc.subr,v retrieving revision 1.68 diff -u -r1.68 rc.subr --- rc.subr 22 Aug 2006 11:17:28 -0000 1.68 +++ rc.subr 22 Aug 2006 14:15:36 -0000 @@ -1332,6 +1332,9 @@ if [ -n "$3" ]; then flags="$3" fi + if [ `${SYSCTL_N} vm.nswapdev` = 0 ]; then + flags="-M $flags" + fi /sbin/mdmfs $flags -s $1 md $2 } Index: defaults/rc.conf =================================================================== RCS file: /home/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.294 diff -u -r1.294 rc.conf --- defaults/rc.conf 17 Aug 2006 20:13:24 -0000 1.294 +++ defaults/rc.conf 22 Aug 2006 14:16:09 -0000 @@ -43,10 +43,10 @@ removable_route_flush="NO" # Flush routes when removing an interface tmpmfs="AUTO" # Set to YES to always create an mfs /tmp, NO to never tmpsize="20m" # Size of mfs /tmp if created -tmpmfs_flags="-S -M" # Extra mdmfs options for the mfs /tmp +tmpmfs_flags="-S" # Extra mdmfs options for the mfs /tmp varmfs="AUTO" # Set to YES to always create an mfs /var, NO to never varsize="32m" # Size of mfs /var if created -varmfs_flags="-S -M" # Extra mount options for the mfs /var +varmfs_flags="-S" # Extra mount options for the mfs /var populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never cleanvar_enable="YES" # Clean the /var directory local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script dirs. Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------