Subject: Re: LKM support
To: None <email@example.com>
From: Jason Thorpe <firstname.lastname@example.org>
Date: 11/09/1996 12:57:46
On Sat, 09 Nov 1996 13:17:37 -0500
"Perry E. Metzger" <email@example.com> wrote:
> We have a need for an MFS like construct. The problem with both the RD
> driver and the MFS driver is that neither really takes advantage of
> the fact that ramdisks are NOT real disks -- both just lay out an FFS
> in memory, which is silly, since the engineering constraints that
> built FFS aren't present in a RAM based filesystem. This leads to all
> sorts of waste.
The ramdisk driver is just that... a "disk" driver, where the blocks
exist in RAM. You can put any filesystem there you want, or you can
use it as raw blocks.
MFS is a pretty nice way of having a unix filesystem simply mountable,
in memory. I ust it for /tmp on most of my systems... the ramdisk doesn't
have the same "automaticness" to it. Adding a bunch of goop to the ramdisk
driver would be a mistake, I think, since it's nice and simple they way it
is, and does what it was designed to do.
The goals of MFS and ramdisk are different.
The comment about waste isn't necessarily accurate; why not just pass
the appropriate arguments to mount_mfs to have it create a less-wasteful
> I would like to see a new MFS built that actually can grow and shrink
> its use of real memory and which takes solid advantage of the fact
> that RAM is not disk to optimize allocation.
Well, first of all, you absolutely want to put an upper bound on
the size of the MFS.
Secondly, this is more of an implementation issue than a design issue,
and it's not clear that making MFS give memory back would really be
all that hard.
The way I understand MFS is that it allocates memory as necessary, i.e.
getting faults on the pages, and then demand-filling them. This
would imply to me that, when an MFS block has been freed, its
corresponding page can be given back to the system, for collection
by the page daemon.
Am I missing something here?
Jason R. Thorpe firstname.lastname@example.org
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939