Re: negative dentries wasting ram
Jakub Jelinek (jakub@redhat.com)
Fri, 24 May 2002 10:53:48 -0400
On Fri, May 24, 2002 at 07:43:32AM -0700, Linus Torvalds wrote:
>
>
> On Fri, 24 May 2002, Andrea Arcangeli wrote:
> >
> > Negative dentries should be only temporary entities, for example between
> > the allocation of the dentry and the create of the inode, they shouldn't
> > be left around waiting the vm to collect them.
>
> Wrong. Negative dentries are very useful for caching negative lookups:
> look at the average startup sequence of any program linked with glibc, and
> depending on your setup you will notice how it tries to open a _lot_ of a
> files that do not exist (the "depending on your setup" comes from the fact
> that it depends on things like how quickly it finds your "locale" setup
> from its locale path - you may have one of the setups that puts it in the
> first location glibc searches etc).
In glibc 2.3 this will be open("/usr/lib/locale/locale-archive", ), so
negative dentries won't be useful for glibc locale handling (that
doesn't mean negative dentries won't be useful for other things, including
exec?p or searching libraries if $LD_LIBRARY_PATH is used).
Jakub
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/