From owner-freebsd-current Sat Jan 13 22:37:44 2001 Delivered-To: freebsd-current@freebsd.org Received: from earth.backplane.com (placeholder-dcat-1076843399.broadbandoffice.net [64.47.83.135]) by hub.freebsd.org (Postfix) with ESMTP id 5A4D437B401 for ; Sat, 13 Jan 2001 22:37:26 -0800 (PST) Received: (from dillon@localhost) by earth.backplane.com (8.11.1/8.9.3) id f0E6ajX43032; Sat, 13 Jan 2001 22:36:45 -0800 (PST) (envelope-from dillon) Date: Sat, 13 Jan 2001 22:36:45 -0800 (PST) From: Matt Dillon Message-Id: <200101140636.f0E6ajX43032@earth.backplane.com> To: Garrett Wollman Cc: Matthew Thyer , Sheldon Hearn , Edwin Culp , current@FreeBSD.ORG Subject: Re: /boot/kernel/kernel: swap_pager_getswapspace: failed References: <672.979299461@axl.fw.uunet.co.za> <3A5F1FDE.AAF40577@camtech.net.au> <200101140401.XAA80787@khavrinen.lcs.mit.edu> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :> No I want mfs to grow and shrink its filesystem dynamically. : :MFS has never done so. MFS is simply a UFS which uses (swap-backed) :memory instead of a physical disk; it relies on the filesystem to :avoid touching blocks that it doesn't need, and on the VM system to :avoid wasting memory on allocated-but-untouched address space. :Historically, MFS would waste time copying disk blocks twice on their :way to the user, but I think this may have been fixed by Matt Dillon. : :-GAWollman Both MFS and VN have the ability to dynamically allocate and free their swap backing store. However, due to limitations in the way filesystems 'free' blocks, only 'full block frees' can be returned to the system. Since files often contain fragments, neither MFS or VN can fully free the backing store related to a file. At a minimum the inode and bitmap blocks will always remain persistent, and filesystem blocks used to store file fragments will tend to remain persistent even when the underlying files have been deleted. -- MFS is very inefficient. I didn't fix that... it isn't possible to fix it without a lot of work. Data must still be copied twice. Even worse, data is cached twice in the system rather then once, so the active data set is bloated over what it could be. VN and MD do not have this problem. Poul is working on integrating the feature of VN, MFS, and MD all into MD. The VN device is probably one's best bet on sharing swap efficiently with a temp filesystem. That said, I do *NOT* recommend any sort of temp/swap sharing, because it makes for a very fragile system. If anything fills up swap, your temp filesystem is screwed. If anything fills up your temp filesystem, your swap is screwed. Bad news all around. Today's hard drives are large enough that you should keep them separate. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message