Josselin: > Le jeudi 12 mai 2005 à 18:32 -0700, Thomas Bushnell BSG a écrit : > > > You said it: there is a cache. After the first access, the directory > > > will be in the cache. Making all of this a purely imaginary problem. > > > > The whole directory is in the cache? I don't think so. Remember, > > that in between each lookup, a library gets searched, which probably > > flushes the entire cache. > > Currently, on my 256 MB machine, the kernel is using 60 MB for the > cache. I think this is enough to include a few directory blocks, > especially some as frequently used as /usr/lib.
You said it yourself. Even if your 256MB machine were typical (it's not), the less cache memory you use to cache dentries of /usr/lib, the better (more memory for your apps, or to cache other, more useful stuff).