From owner-freebsd-hackers Sun Apr 18 7:54:54 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from iquest3.iquest.net (iquest3.iquest.net [209.43.20.203]) by hub.freebsd.org (Postfix) with SMTP id 3C05A14FC3 for ; Sun, 18 Apr 1999 07:54:51 -0700 (PDT) (envelope-from toor@dyson.iquest.net) Received: (qmail 6897 invoked from network); 18 Apr 1999 14:52:24 -0000 Received: from dyson.iquest.net (198.70.144.127) by iquest3.iquest.net with SMTP; 18 Apr 1999 14:52:24 -0000 Received: (from root@localhost) by dyson.iquest.net (8.9.1/8.9.1) id JAA18474; Sun, 18 Apr 1999 09:52:22 -0500 (EST) From: "John S. Dyson" Message-Id: <199904181452.JAA18474@dyson.iquest.net> Subject: Re: Directories not VMIO cached at all! In-Reply-To: <199904180710.AAA77612@apollo.backplane.com> from Matthew Dillon at "Apr 18, 99 00:10:41 am" To: dillon@apollo.backplane.com (Matthew Dillon) Date: Sun, 18 Apr 1999 09:52:21 -0500 (EST) Cc: dyson@iquest.net, dg@root.com, hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > :You are right about VDIR's not being B_VMIO. That was a decision made early > :on when the vfs_bio code was not trustworthy :-). It is okay, and advantageous > :to cache VDIR's with merged cache. > : > :I agree that it is time to make the change. > : > :-- > :John | Never try to teach a pig to sing, > > DG agrees. Great! David says he will do the commit. > > I really like the effect the patch has had on my systems, I think this > patch is a candidate for MFC'ing to -stable later on, too ( before the next > release ). We might eventually be able to get rid of B_MALLOC entirely, > but I'll save that for a later time. > The purpose of B_MALLOC was to eliminate the unnecessary overhead for lots of small directories being backed by entire pages instead of partial pages. (Internal memory fragmentation.) Most dirs are 512 or 2048 and wasting an entire page for most directories seems to be undesireable. The advantage of coherent caching of directories is pretty much non-existant, since such naming happens through the VFS layering framework. The big advantage of what you have suggested is that directory caching isn't limited by the size of the buffer cache. I originally designed the code to support the buffer cache only being a temporary mapping, and dirty pages could be passed from the buffer cache to the anonymous cache. The only advantage of getting rid of B_MALLOC would be to totally relax the amount of memory used for caching directories. The disadvantage is the potentially gross amount of internal fragmentation of memory. Perhaps before getting rid of B_MALLOC, take a look at the standard mix of directory sizes (don't just look at news servers.) If there is an extreme bias towards 512 or 2048, then you might consider keeping B_MALLOC. John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message