Subject: Re: mfs read operations.
To: Jason R Thorpe <thorpej@zembu.com>
From: =?iso-8859-1?Q?P=E5l_Halvorsen?= <paalh@unik.no>
List: tech-kern
Date: 07/22/2001 09:19:08
On Fri, 20 Jul 2001, Jason R Thorpe wrote:
> On Fri, Jul 20, 2001 at 01:41:45PM +0200, P=E5l Halvorsen wrote:
>
> > I'm reading data from a memory file system (mfs), due to bad performan=
ce
> > of my single-disk storage system, and when monitoring the
> > operations, it seems like the VOP_STRATEGY in bio_read() is not called=
=2E
> > However, getblk() is called. Why?
> > Should VOP_STRATEGY be called (is my counter wrong)?
> >
> > How does the read operates on a mfs? Is the memory blocks containing
> > data only mapped into the buf structures, e.g., using UVM's page loano=
ut
> > or map entry passing?
>
> Neither. The current MFS implementation is somewhat of a hack.
Where can I find the code for mfs?
> Basically, MFS is really just FFS (seriously, it uses all of the FFS
> file system code), but merely provides a different backing store for
> that FFS -- instead of a disk, it uses the address space of a process.
OK, I knew this, but where is the code that calls the mfs to copy data
into the buf structure's data area - i have a monitor in bio_read() called
from ffs_read (READ() in ufs_readwite.c) --??? I'm sitting remote and
cant check the code-- and it looks like VOP_STRATEGY is not called.
I might put another monitor here...
Thanks,
-ph
> When I/O to that backing store is to be done, it queues the buffer, wakes
> up the process holding the MFS backing store, which then performs a copyi=
n/
> copyout from the process's user address space to the buffer, and biodone'=
s
> that buffer.
>
> It was done this way to allow the space used by the file system to be
> pageable -- it just gets put in swap space.
>
> There are arguably much better ways to write a memory-based file system.
> But as I understand it, MFS was written this way originally for a couple
> of reasons:
>
> =09- As a way to demonstrate how alternate backing store
> =09 for FFS worked.
>
> =09- It was quick and easy.
-ph
--- . o o . o . o .. o .. o .. o oo . o . o o o
_n_n_n____i_i _++++++_ _______ ________ _+++++++++++_
*>(____________I I______I I_____I I______I I___________I
__^__ /ooOOOO OOOOoo oo ooo oo oo oo oo ooo ooo __^__
( ___ )--------------------------------------------------------( ___ )
| / | Paal Halvorsen UniK - Center for technology at Kjeller | \ |
| / | University of Oslo | \ |
| / | Phone: +47 64844731 PB. 70 | \ |
| / | Phone: +47 64844700 (switchboard) N - 2027 KJELLER | \ |
|_/_| Fax: +47 63818146 Norway |_\_|
(_____)-- E-mail: paalh@unik.no -- http://www.unik.no/~paalh --(_____)