From owner-freebsd-current@FreeBSD.ORG Thu Jun 2 01:26:57 2005 Return-Path: X-Original-To: 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 2D1FF16A41C; Thu, 2 Jun 2005 01:26:57 +0000 (GMT) (envelope-from andy@siliconlandmark.com) Received: from lexi.siliconlandmark.com (lexi.siliconlandmark.com [209.69.98.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CCCB43D54; Thu, 2 Jun 2005 01:26:56 +0000 (GMT) (envelope-from andy@siliconlandmark.com) Received: from lexi.siliconlandmark.com (localhost [127.0.0.1]) by lexi.siliconlandmark.com (8.13.3/8.13.3) with ESMTP id j521Qp1V042887; Wed, 1 Jun 2005 21:26:51 -0400 (EDT) (envelope-from andy@siliconlandmark.com) Received: from localhost (andy@localhost) by lexi.siliconlandmark.com (8.13.3/8.13.3/Submit) with ESMTP id j521QoM7042884; Wed, 1 Jun 2005 21:26:50 -0400 (EDT) (envelope-from andy@siliconlandmark.com) X-Authentication-Warning: lexi.siliconlandmark.com: andy owned process doing -bs Date: Wed, 1 Jun 2005 21:26:50 -0400 (EDT) From: Andre Guibert de Bruet To: Don Lewis In-Reply-To: <200506020107.j5217fV2002101@gw.catspoiler.org> Message-ID: <20050601211542.G41030@lexi.siliconlandmark.com> References: <200506020107.j5217fV2002101@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Information: Please contact the ISP for more information X-SL-MailScanner: Found to be clean X-SL-SpamCheck: not spam, SpamAssassin (score=-2.542, required 6, autolearn=not spam, AWL 0.06, BAYES_00 -2.60) X-MailScanner-From: andy@siliconlandmark.com Cc: Alexander@Leidinger.net, phk@phk.freebsd.dk, current@FreeBSD.org Subject: Re: [RFC] [PATCH] VM & VFS changes 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, 02 Jun 2005 01:26:57 -0000 On Wed, 1 Jun 2005, Don Lewis wrote: > On 1 Jun, Andre Guibert de Bruet wrote: >> On Wed, 1 Jun 2005, Alexander Leidinger wrote: >>> Poul-Henning Kamp wrote: >>> >>>> Maybe the simplest solution is also the best: keep track of the >>>> dependencies and do the cleanup leaf->root on the resulting tree. > > It might not even be necessary to use a tree. It might be possible to > just use a list like vfs_unmountall(). I do some similar magic in my diff, to check for devfs. I can write a function that unmounts all mds first. >>> How many userland processes have to be running and consuming memory which >>> isn't available as physical RAM at this point in the shutdown sequence? >>> >>> Wouldn't a loop like the following be enough? >>> while swap >>> umount unbusy-FS >>> swap-off swap >>> >>> This assumes that swap-off doesn't turns off the swap if it isn't able to put >>> everything back into other swap or physical RAM areas. >> >> I would think that one would want to disable swapping before the unmount >> of filesystems for the very fact you could have vnode-backed swapspace in >> use. > > This order doesn't work either because you might only have 128 MB of > RAM, but 1 GB of data in /tmp, which is stored on a swap-backed memory > disk. In this case you'll have to unmount /tmp and toss the md contents > before you disable swap. I could modify my patchset to get a first pass at MDs, then disable swap, then unmount UFS/FFS/ext2/etc, then devfs. The question becomes: Is this the correct process that we should follow? It makes sense to me. I would like to get input from our VM & VFS gurus on this before I schedule a hack-and-testathon... :-) Cheers! Andy /* Andre Guibert de Bruet * 6f43 6564 7020 656f 2e74 4220 7469 6a20 */ /* Code poet / Sysadmin * 636f 656b 2e79 5320 7379 6461 696d 2e6e */ /* GSM: +1 734 846 8758 * 5520 494e 2058 6c73 7565 6874 002e 0000 */ /* WWW: siliconlandmark.com * Tormenting bytes since 1980. */