Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Apr 1999 09:52:21 -0500 (EST)
From:      "John S. Dyson" <toor@dyson.iquest.net>
To:        dillon@apollo.backplane.com (Matthew Dillon)
Cc:        dyson@iquest.net, dg@root.com, hackers@freebsd.org
Subject:   Re: Directories not VMIO cached at all!
Message-ID:  <199904181452.JAA18474@dyson.iquest.net>
In-Reply-To: <199904180710.AAA77612@apollo.backplane.com> from Matthew Dillon at "Apr 18, 99 00:10:41 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> :You are right about VDIR's not being B_VMIO.  That was a decision made early
> :on when the vfs_bio code was not trustworthy :-).  It is okay, and advantageous
> :to cache VDIR's with merged cache.
> :
> :I agree that it is time to make the change.
> :
> :-- 
> :John                  | Never try to teach a pig to sing,
> 
>     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.

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.

John


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?199904181452.JAA18474>