From owner-freebsd-hackers Sun Apr 18 10: 0:36 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 5FA4115516 for ; Sun, 18 Apr 1999 10:00:24 -0700 (PDT) (envelope-from toor@dyson.iquest.net) Received: (qmail 18939 invoked from network); 18 Apr 1999 16:57:16 -0000 Received: from dyson.iquest.net (198.70.144.127) by iquest3.iquest.net with SMTP; 18 Apr 1999 16:57:16 -0000 Received: (from root@localhost) by dyson.iquest.net (8.9.1/8.9.1) id LAA18643; Sun, 18 Apr 1999 11:57:14 -0500 (EST) From: "John S. Dyson" Message-Id: <199904181657.LAA18643@dyson.iquest.net> Subject: Re: Directories not VMIO cached at all! In-Reply-To: <19990418164232.4DC7C1F2A@spinner.netplex.com.au> from Peter Wemm at "Apr 19, 99 00:42:30 am" To: peter@netplex.com.au (Peter Wemm) Date: Sun, 18 Apr 1999 11:57:14 -0500 (EST) Cc: dillon@apollo.backplane.com, 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 > "John S. Dyson" wrote: > > > :You are right about VDIR's not being B_VMIO. That was a decision made ear > ly > > > :on when the vfs_bio code was not trustworthy :-). It is okay, and advanta > geous > > > :to cache VDIR's with merged 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. > > Would small block devices/filesystems likely be affected? (ie: msdos, > ext2fs etc) > Special dispensation is given to those filesystems... All blocks are laid out into merged cache pages. The locality of reference associated with typical filesystem usage argues against the overhead of the fragmentation. In the case of directories, the fragmentation is due to the allocation unit size of the merged cache (1 PAGE), and the size of the directory typically being < 1PAGE. Of course, it is advantageous to have block sized directory chunks for disk filesystem consistancy reasons. (I don't really know if it is so valuable now.) For small block filesystems, it would be wasteful (or would cause incoherence) to either use B_MALLOC buffers, or allocate each block as a portion of a page. This is where alot of the complexity of the current caching scheme comes into play. Also, NFS is a weird monster in it's own right. Frankly, NFS is a candidate to make into a true merged filesystem (bypassing the buffer cache entirely), and FFS is such a candidate because of it being so common. Since the need for backwards compatibility with the old BSD style buffer cache isn't really needed any more (softupdates is likely the only important development that legacy support is needed), I strongly suggest "fixing" the commonly used filesystems to bypass the majority of the vfs_bio complexity now. (That was in my plans.) John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message