Subject: Re: cheap performance boost tip
To: Ross Harvey <ross@teraflop.com>
From: Perry E. Metzger <perry@piermont.com>
List: port-arm32
Date: 08/31/1998 15:05:01
I keep thinking, btw, that we should construct an "mfs v2" that
dynamically sizes itself and does not attempt to pretend to be a disk,
but instead just allocates chains of memory in the obvious manner...
Perry
Ross Harvey writes:
> Anyone who wants to know just how the MFS works need only read mfs_doio() in:
>
> src/sys/ufs/mfs/mfs_vnops.c.
>
> It's a grand total of only _8_ lines, and it does all the MFS I/O by just
> calling copyin() or copyout() to the mount_mfs process.
>
> And that process is just the newfs process: see line 172 in
>
> src/sbin/newfs/mkfs.c
>
> Which contains:
>
> membase = malloc(fssize * sectorsize)
>
> Yes, the entire MFS is just a thing returned by a user program calling
> malloc(3). The blocks will be created as they are touched. They are never
> released, but for the most part don't exist until used.
>
>
> -- Ross Harvey