Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jul 1999 18:27:23 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Jason Thorpe <thorpej@nas.nasa.gov>
Cc:        Peter Wemm <peter@netplex.com.au>, Julian Elischer <julian@whistle.com>, David Greenman <dg@root.com>, freebsd-hackers@FreeBSD.ORG, freebsd-current@FreeBSD.ORG
Subject:   Re: Heh heh, humorous lockup 
Message-ID:  <199907080127.SAA95703@apollo.backplane.com>
References:   <199907080043.RAA19553@lestat.nas.nasa.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
:On Thu, 08 Jul 1999 08:36:19 +0800 
: Peter Wemm <peter@netplex.com.au> 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 <thorpej@nas.nasa.gov>

    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 
					<dillon@backplane.com>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907080127.SAA95703>