Subject: swapfs and uvm.
To: None <tech-kern@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-kern
Date: 03/14/2000 23:26:58
Folks,

I'm toying with the idea of trying to write a swapfs as a learning
exercise on both filesystems and uvm.  Jason has suggested than an aobj
would be the ideal basis for such a filesystem, and I've just started
looking into this.  I've got a couple of basic random mutterings:

 * The swapfs would be based on a single aobj that would default to
   the total swap size, but have a maximum configurable size as per
   the current mfs.

 * I was thinking of using a really simple filesystem layout with a
   dynamic number of inodes.  No fragments, everything is allocated in
   pagesize chunks.  Some rough scribblings on a notepad are geared to a
   4GB maximum size (page offsets, file sizes) - would this be a problem
   in the real world?

 * Perhaps later on using some sort of tree for directory entries.
   Maybe not an issue - how big to directories grow on /tmp?

and questions:

 * Is it possible to release individual pages in an aobj back to the
   system?  This is one of the major problems with the current mfs (as
   well as copying data multiple times).  If not, is there another sort
   of uvm object that might be better suited to a swapfs?

 * Is "swapfs" the right name for this sort of filesystem?

Please note that I'm not planning a quick turn-around with this
project - it's something to play and learn with.

Simon.