Re: [RFC] [PATCH] VM & VFS changes

From: Don Lewis <truckman_at_FreeBSD.org>
Date: Tue, 31 May 2005 23:40:41 -0700 (PDT)
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.
Received on Wed Jun 01 2005 - 04:40:49 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:35 UTC