:On Thu, 08 Jul 1999 08:36:19 +0800 
: Peter Wemm <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>

    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 
                                        <[EMAIL PROTECTED]>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to