From owner-freebsd-hackers Wed Apr 21 1:35:13 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.oeno.com (ns.oeno.com [194.100.99.145]) by hub.freebsd.org (Postfix) with SMTP id 18EAF14C1E for ; Wed, 21 Apr 1999 01:35:09 -0700 (PDT) (envelope-from will@ns.oeno.com) Received: (qmail 26304 invoked by uid 1001); 21 Apr 1999 08:32:41 -0000 To: dg@root.com Cc: hackers@freebsd.org Subject: Re: Directories not VMIO cached at all! References: <199904201928.MAA99383@apollo.backplane.com> <199904202056.NAA11478@implode.root.com> From: Ville-Pertti Keinonen Date: 21 Apr 1999 11:32:19 +0300 In-Reply-To: dg@root.com's message of "21 Apr 1999 00:00:13 +0300" Message-ID: <86r9pejrvw.fsf@not.demophon.com> Lines: 46 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG dg@root.com (David Greenman) writes: > I prefer the current architecture, actually. Several problems come to > mind with your proposed scheme: On for example is problems with handling > filesystems with block sizes less than a page. I think there are a lot of Perhaps the "page-block-sizes" should only be sub-pages if there is only a sub-page's worth of data left in the object (sort of like ffs end fragments). This would mean that the valid/dirty masks wouldn't be discarded. And you certainly don't need a short for size, two bits are enough if you stick to powers of two. The size of struct vm_page wouldn't need to change, nor would the ability to track finer-granularity validity and dirtyness for pages without having multiple headers. Then there's the case of mmapping the last (possibly sub-page) block, which would require extending it to a full page, breaking the size "rule"...more special cases - not good. But one can also argue that the complexity in ffs for dealing with end fragments isn't good, either, but for a block-based filesystem, it is quite beneficial. If I had any influence over the matter, I wouldn't make any quick judgements as to whether Matt's suggestion is useful or not. I've seen the idea of getting rid of the separate buffer cache altogether mentioned a few times - if this is something that FreeBSD intends to do, then memory is either going to be wasted by fragmentation or sub-page vm_page allocations eventually need to be supported. Not necessarily using the first scheme presented, of course. If the buffer cache is here to stay...isn't it philosophically wrong to use vm_pages for general-purpose caching when there are bufs that exist for this purpose (even if the storage is actually shared)? Maybe not if the purpose of bufs is redefined, but redefining their purpose could make replacing their current use with a kind of "block I/O request" with a much shorter lifetime more appropriate. And this would effectively get rid of the buffer cache. > other problems, too, but I'm too busy to go looking for them. I don't > really see how it fixes anything, either - the wastage for directory blocks > will still be there unless you create fictitious pages and/or support offsets I always thought that the use of the term fictitious referred to the fact that the placeholders don't have associated memory, rather than the fact that they aren't statically allocated per-page. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message