From owner-freebsd-current@FreeBSD.ORG Thu Jun 1 00:24:18 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5394216C347 for ; Thu, 1 Jun 2006 00:18:25 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7502043D48 for ; Thu, 1 Jun 2006 00:18:24 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.6/8.13.6/Debian-1) with ESMTP id k510IAY1019279 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 1 Jun 2006 03:18:12 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.6/8.13.6) with ESMTP id k510KOg2002312; Thu, 1 Jun 2006 03:20:24 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.pc (8.13.6/8.13.6/Submit) id k510KOj8002311; Thu, 1 Jun 2006 03:20:24 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Thu, 1 Jun 2006 03:20:24 +0300 From: Giorgos Keramidas To: Kris Kennaway Message-ID: <20060601002024.GA1453@gothmog.pc> References: <20060522211223.GA3621@xor.obsecurity.org> <20060522231437.GC1446@odin.ac.hmc.edu> <20060523133037.GA2908@gothmog.pc> <20060523143013.GA11472@ci0.org> <20060523194106.GA46634@xor.obsecurity.org> <20060524203645.GB13500@gothmog.pc> <20060524203747.GA88742@xor.obsecurity.org> <20060524204617.GA13701@gothmog.pc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060524204617.GA13701@gothmog.pc> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-4.048, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.35, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: freebsd-current@freebsd.org Subject: Re: md /tmp and async mounts X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2006 00:24:31 -0000 On 2006-05-24 23:46, Giorgos Keramidas wrote: > AFAIK, only /etc/rc.d/tmp and /etc/rc.d/var use the mount_md() function > from `rc.subr'. I think `/etc/rc.initdiskless' includes a local version > of mount_md() and uses that one. > > On 2006-05-24 16:37, Kris Kennaway wrote: > > On Wed, May 24, 2006 at 11:36:45PM +0300, Giorgos Keramidas wrote: > > > If that is so, do you want me to make the change, or do you want to do > > > this? > > > > I don't have a good idea of what needs to be changed to do all of the > > above, so if you're familiar with the code you might as well do it. > > I can certainly prepare a patch for /etc/rc.d/* files and their > manpages. I'll post it for review then :) The following diff should be sufficient for enabling -o async for the MFS /tmp and MFS /var filesystems we support in our current rc.d stuff: %%% Index: share/man/man5/rc.conf.5 =================================================================== --- share/man/man5/rc.conf.5 (revision 99) +++ share/man/man5/rc.conf.5 (revision 101) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD: src/share/man/man5/rc.conf.5,v 1.298 2006/05/30 16:20:48 matteo Exp $ .\" -.Dd May 29, 2006 +.Dd Jun 1, 2006 .Dt RC.CONF 5 .Os .Sh NAME @@ -241,12 +241,13 @@ .Pa /tmp is created. The default is -.Dq Li "-S -M" , +.Dq Li "-S -M -o async" , which inhibits the use of softupdates on .Pa /tmp to waste as little space as possible -and creates a pure memory backed disk, which will never be swapped out, -for maximum performance and system stability at low memory conditions. +and creates a pure memory-backed disk, which uses asynchronous I/O +and will never be swapped out, for maximum performance and system +stability at low memory conditions. See .Xr mdmfs 8 for other options you can use in @@ -273,12 +274,13 @@ .Pa /var is created. The default is -.Dq Li "-S -M" , +.Dq Li "-S -M -o async" , which inhibits the use of softupdates on .Pa /var to waste as little space as possible -and creates a pure memory backed disk, which will never be swapped out, -for maximum performance and system stability at low memory conditions. +and creates a pure memory-backed disk, which uses asynchronous I/O +and will never be swapped out, for maximum performance and system +stability at low memory conditions. See .Xr mdmfs 8 for other options you can use in Index: etc/defaults/rc.conf =================================================================== --- etc/defaults/rc.conf (revision 99) +++ etc/defaults/rc.conf (revision 101) @@ -43,10 +43,10 @@ removable_route_flush="YES" # 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 -M -o async" # 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 -M -o async" # 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. %%% This doesn't make 'async' the default for all mdmfs mounts. Making async the default for mdmfs-based filesystems would require a fair bit of changes to mdmfs, which would have to grow mount-option parsing capabilities for the `optarg' of the -o option and make sure that async is always added, unless mdmfs is called explicitly with `noasync' in its -o option. Having said this, if this is considered a change we should make, I can prepare a patch for mdmfs too. - Giorgos