From owner-freebsd-hackers Wed Jul 7 18:27:39 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id C6A2D14D75; Wed, 7 Jul 1999 18:27:26 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id SAA95703; Wed, 7 Jul 1999 18:27:23 -0700 (PDT) (envelope-from dillon) Date: Wed, 7 Jul 1999 18:27:23 -0700 (PDT) From: Matthew Dillon Message-Id: <199907080127.SAA95703@apollo.backplane.com> To: Jason Thorpe Cc: Peter Wemm , Julian Elischer , David Greenman , freebsd-hackers@FreeBSD.ORG, freebsd-current@FreeBSD.ORG Subject: Re: Heh heh, humorous lockup References: <199907080043.RAA19553@lestat.nas.nasa.gov> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :On Thu, 08 Jul 1999 08:36:19 +0800 : Peter Wemm wrote: : : > Out of curiosity, how does it handle the problem of small 512 byte : > directories? Does it consume a whole page or does it do something smarter? : > Or does the ubc work apply to read/write only and the filesystem itself : > continues to use the buffer cache interfaces for metadata and directories : > still? Does the caching part of the bio system still exist? : :At the moment, only VREG is handled w/ UBC. We plan on addressing that :in the future. : :In the case of file system blocks smaller than a page size, multiple :blocks are read into the page. In the case of small directories, :"we'll burn that bridge when we come to it" (i.e. when we attempt to :deal with non-VREG). : :So, the caching part of the bio interface still exists for now (in part, :this helps us to use file systems which haven't yet been converted to :the UBC interface). : : -- Jason R. Thorpe I would also like to add that FreeBSD's current method of handling small directories does not work very well. It saves memory, sure, but it is based on specialized B_MALLOC buffers in the buffer cache and is unable to use the wider-ranging VM page cache. Since we do not keep buffers around for very long and non-VMIO-backed memory goes away with the buffer, the result is that FreeBSD does a terrible job caching directories. DG and I have experimented with turning on VMIO backing for directories. It works except for a bug in softupdates which I am going to get Kirk interested in (so hopefully it will get fixed). John Dyson is against it due to the waste in memory but I am of the opinion that the waste will not be that bad - and, in anycase, the worst that can happen is that we will throw pages containing directory data away that would have long since been thrown away with the old buffer cache mechanism anyway. For FreeBSD, the changes are so simple that we can add a sysctl to turn the capability on and off. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message