From owner-freebsd-current@FreeBSD.ORG Wed Jun 1 06:40:49 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 E09A516A41C for ; Wed, 1 Jun 2005 06:40:49 +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 A411543D1D for ; Wed, 1 Jun 2005 06:40:49 +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 j516efHC091087; Tue, 31 May 2005 23:40:46 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200506010640.j516efHC091087@gw.catspoiler.org> Date: Tue, 31 May 2005 23:40:41 -0700 (PDT) From: Don Lewis To: andy@siliconlandmark.com In-Reply-To: <20050601000203.D69811@lexi.siliconlandmark.com> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: 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: Wed, 01 Jun 2005 06:40:50 -0000 On 1 Jun, Andre Guibert de Bruet wrote: > Hi, > > I would like to present a unified set of VM and VFS diffs for wider > scrutiny and testing. I have been running these diffs since May 10th > across daily reboots with no issues. > > What this patch does: > - Adds code that cleanly unmounts swaps (Forcing page-in first) after the > final sync but before all of the filesystems are unmounted. This causes > references to swap slices in devfs to not be dangling when the machine is > rebooted. What if there is not enough RAM it page in the swap contents? This may be likely to happen if swap-backed md(4) devices are used. This problem is a bit complicated because there can be various combinations of: mounted file systems that reside on swap-backed memory disks mounted file systems that reside on vnode-backed memory disks vnode-backed memory disks used as swap devices so that there is no simple ordering of operations that can be used on shutdown. I think that even some wierd cases like a mounted file system that resides on a vnode-backed memory disk, whose backing file resides in a file system that resides on a swap-backed memory disk, might be legitimate. On shutdown, file systems should be unmounted, swap devices should be disabled, and memory disks should be unconfigured, all in reverse dependency order. When swap-backed memory disks are unconfigured, their contents can be discarded and the contents don't have to be paged in before disabling the backing swap device. I don't even want to think about swapping to a swap-backed memory disk.