From owner-freebsd-current@FreeBSD.ORG Thu Jun 2 01:07:52 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 364F616A41C for ; Thu, 2 Jun 2005 01:07:52 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id F008C43D48 for ; Thu, 2 Jun 2005 01:07:51 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.1/8.13.1) with ESMTP id j5217fV2002101; Wed, 1 Jun 2005 18:07:46 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200506020107.j5217fV2002101@gw.catspoiler.org> Date: Wed, 1 Jun 2005 18:07:41 -0700 (PDT) From: Don Lewis To: andy@siliconlandmark.com In-Reply-To: <20050601113320.G69811@lexi.siliconlandmark.com> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii 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:07:52 -0000 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(). >> 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.