Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Apr 1999 13:02:47 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        "John S. Dyson" <toor@dyson.iquest.net>
Cc:        dg@root.com, hackers@freebsd.org
Subject:   Re: Directories not VMIO cached at all!
Message-ID:  <199904182002.NAA81858@apollo.backplane.com>
References:   <199904181452.JAA18474@dyson.iquest.net>

next in thread | previous in thread | raw e-mail | index | archive | help
:>     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.
:
:John

    I see an advantage both ways.  Not only are we able to use the VM cache
    to cache directories ( and thus scale directory operations to memory ),
    but I don't think there is even a downside to mapping whole pages even for
    small directories.  The reason is simple:  When you access small 
    directories you tend to access specific files in said directories.  When
    you access specific files, there's a good chance they will be in the namei
    cache.  If they are in the namei cache, the VMIO mapping will not be
    referenced very often for most small directories which means that the
    VM cache will throw it away.  Hence, no waste.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>


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




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