Dealing with negative dentries
Dealing with negative dentries
Posted May 10, 2022 17:06 UTC (Tue) by NYKevin (subscriber, #129325)In reply to: Dealing with negative dentries by willy
Parent article: Dealing with negative dentries
bash hashes those automatically. It does one lookup and then remembers where the file lives. Try running the command hash to see your lookup table. Ironically, this is a perfect example of negative dentry cache leakage, because the kernel is remembering information which userspace already tracks anyway.
(zsh also does this, and I imagine most other modern shells do as well.)
> Similar issues for header files; each invocation of gcc needs to search every directory in the -I directories for the header files.
I'm not saying that we should get rid of negative dentries altogether, just that you don't need a huge number of them. Just how many header files are you searching for?
