From owner-freebsd-stable@FreeBSD.ORG Mon May 29 17:50:53 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2AF5E16A558 for ; Mon, 29 May 2006 17:50:53 +0000 (UTC) (envelope-from gcr+freebsd-stable@tharned.org) Received: from nc8000.tharned.org (rrcs-24-56-87-26.ma.biz.rr.com [24.56.87.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F0FE43D48 for ; Mon, 29 May 2006 17:50:52 +0000 (GMT) (envelope-from gcr+freebsd-stable@tharned.org) Received: from nc8000.tharned.org (gcr@localhost [127.0.0.1]) by nc8000.tharned.org (8.13.6/8.13.6) with ESMTP id k4THoqT8043539; Mon, 29 May 2006 12:50:52 -0500 (CDT) (envelope-from gcr+freebsd-stable@tharned.org) Received: from localhost (gcr@localhost) by nc8000.tharned.org (8.13.6/8.13.6/Submit) with ESMTP id k4THoq7I043536; Mon, 29 May 2006 12:50:52 -0500 (CDT) (envelope-from gcr+freebsd-stable@tharned.org) Date: Mon, 29 May 2006 12:50:52 -0500 (CDT) From: Greg Rivers Sender: gcr@tharned.org To: Ulrich Spoerlein In-Reply-To: <20060529144610.GD1117@roadrunner.q.local> Message-ID: <20060529121831.F43434@nc8000.tharned.org> References: <44764417.4030004@alumni.rice.edu> <20060526004343.GE28128@groat.ugcs.caltech.edu> <200605252220.44739.gcr+freebsd-stable@tharned.org> <20060529144610.GD1117@roadrunner.q.local> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Paul Allen , freebsd-stable@freebsd.org Subject: Re: kmem leak in tmpmfs? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2006 17:50:53 -0000 On Mon, 29 May 2006, Ulrich Spoerlein wrote: > Greg Rivers wrote: >> On Thursday 25 May 2006 19:43, Paul Allen wrote: >>>> From Jonathan Noack , Thu, May 25, 2006 at >>>> 07:56:07PM -0400: I am currently running with the following in >>>> /etc/rc.conf and haven't experienced any problems: >>>> tmpmfs_flags="-S -o async" >>> >>> Is there a way to accomplish this with an fstab entry? >>> >>> md /tmp mfs rw,async,-s1024m,-S >>> >>> no,I don't think so. But surely it would be better to just fixup the >>> standard mount -t path to not call mount_mfs... >>> >> >> Actually there is a way. I too have not been satisfied with the tmpmfs >> features in rc, so for some time now I've simply created a hard link: >> >> cd /sbin && ln -f mdmfs mount_md >> >> and then used an entry like this in /etc/fstab: >> >> md /tmp md rw,async,-Sp1777,-s768M 0 0 >> >> This works great for me. A simple patch to mtree could make this hard link >> part of the base system. Nothing else is needed. > > You should use the 'mfs' file system. This works out of the box: > > md /tmp mfs rw,-s256m,-S,-Otime,async,noatime 0 0 > > Ulrich Spoerlein > Using 'mfs' as you suggest doesn't work; you'll only get a usage message when you try to mount: usage: mount_mfs -C [-lNU] [-a maxcontig] [-b block-size] [-c cylinders] [-d rotdelay] [-e maxbpg] [-F file] [-f frag-size] [-i bytes] [-m percent-free] [-n rotational-positions] [-O optimization] [-o mount-options] [-s size] [-v version] md-device mount-point This is because not all mdmfs options are available in "mount_mfs compatibility" mode as described at the bottom of mdmfs(8). Conspicuously absent are -p, -S, and -w. With 'mfs', you can't turn off softupdates (ie. can't have async), and you can't set arbitrary modes and ownerships on the file system. Creating the "mount_md" hard link to mdmfs and using type 'md' in fstab allows you to use all the features of mdmfs. -- Greg