From owner-freebsd-hackers Thu Jan 7 21:11:53 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA03012 for freebsd-hackers-outgoing; Thu, 7 Jan 1999 21:11:53 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from bright.fx.genx.net (bright.fx.genx.net [206.64.4.154]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA03000 for ; Thu, 7 Jan 1999 21:11:49 -0800 (PST) (envelope-from bright@hotjobs.com) Received: from localhost (bright@localhost) by bright.fx.genx.net (8.9.1/8.9.1) with ESMTP id AAA63146; Fri, 8 Jan 1999 00:15:52 -0500 (EST) (envelope-from bright@hotjobs.com) X-Authentication-Warning: bright.fx.genx.net: bright owned process doing -bs Date: Fri, 8 Jan 1999 00:15:52 -0500 (EST) From: Alfred Perlstein X-Sender: bright@bright.fx.genx.net To: Matthew Dillon cc: freebsd-hackers@FreeBSD.ORG Subject: (mfs idea) Re: questions/problems with vm_fault() in Stable In-Reply-To: <199901080453.UAA37668@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. > (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