The Dcache
- Contains a hash table of "dentry" objects, each representing a translation
from a path to an inode (including "negative" dentries - representing
recent lookups to non-existing files).
- The dentries are also connected in a tree structure, representing the
structures of files and directories on the mounted file systems.
- An entry remains in the dcache until its file-system is un-mounted...
- ... or until it is pruned during a cache shrink, which happens once
every 300 seconds, by the swap-daemon (kswapd)...
- ... or when the swap-daemon (kswapd) needs to free space.
- See file fs/cache.c, function prune_dcache, for the gory details.
Originally written by
guy keren