Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jan 1999 00:15:52 -0500 (EST)
From:      Alfred Perlstein <bright@hotjobs.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   (mfs idea) Re: questions/problems with vm_fault() in Stable
Message-ID:  <Pine.BSF.4.05.9901072359100.37756-100000@bright.fx.genx.net>
In-Reply-To: <199901080453.UAA37668@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help

i trimmed the cc so as to avoid death threats :)

On Thu, 7 Jan 1999, Matthew Dillon wrote:

> :> 
> :>     Which buffer?  The one MFS passed back or the original one that was
> :>     replaced?  I assume you mean that the original buffer is freed and
> :>     we are now talking about the one MFS passed back, currently under
> :>     control of FFS, is no longer being used and eventually is ready 
> :>     to be freed again.
> :
> :Yes, I just thought of a simple idea that may make this a reality, ALL
> :pages returned by MFS are marked dirty so that they are 'flushed' to the
> :MFS disk no matter what.
> :
> :Really nothing is done except the fact that the FFS can not 'steal' pages
> :from the MFS and try to reuse them because they DO belong to the MFS.
> :
> :Just an idea for zero copy. (well single copy, kernel to process, instead
> :of kernel to kernel to process)
> 
>     Ick.  We can't just mark them dirty, it would cost too much.  The
>     most common filesystem operation is a read.  We do not want to force
>     reads to generate writes back out to swap, which is what marking the
>     page dirty would do.

I'm still unsure about my proposal, but i _know_ you misunderstood me :)

The buffer is just marked as dirty so that the FFS doesn't overwrite it.  
MFS _must_ reclaim them into it's own address space to avoid being
overwritten.

Since i assume that when a buffer is flushed it should then be free
you have to 'give something back'

What you give back is either dependant on what you did with the original
buffer you replaced, you either had:

a) hid/put it on the locked list, so now you just retrieve it and spam it
under the vnode.  (simple lookup & pointer swap)

b) overcommited and put it on the LRU list, you must now traverse the LRU
looking for pages that are not MFS, force them out and return the
non MFS buffers to the vnode. (buffer chain traversal) (*)

the mfs still has to contend with normal processes for memory, however
when one of it's pages is in the buffer-cache it must be 'locked' so a
buffer is not spammed onto swap, as i don't think the buffer cache can
handle not being in memory.

(*) since freebsd's vm/cache is dynamic it should be able to handle a
disapearing buffer midway in the LRU

(or maybe this is already done, or just can't be done :( )

-Alfred

>     Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet 
>                     Communications & God knows what else.
>     <dillon@backplane.com> (Please include original email in any response)    
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9901072359100.37756-100000>