(Hidden by Administrator)
Bug 1603801 Comment 1 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Note, negative dcache entries can be tracked on a modern Linux kernel via /proc/sys/fs/dentry-state
```
# cat /proc/sys/fs/dentry-state
690051 666440 45 0 29022 0
dentry-state
------------
From linux/include/linux/dcache.h::
struct dentry_stat_t dentry_stat {
int nr_dentry;
int nr_unused;
int age_limit; /* age in seconds */
int want_pages; /* pages requested by system */
int nr_negative; /* # of unused negative dentries */
int dummy; /* Reserved for future use */
};
```
Dentries are dynamically allocated and deallocated.
nr_dentry shows the total number of dentries allocated (active + unused). nr_unused shows the number of dentries that are not actively used, but are saved in the LRU list for future reuse.
Age_limit is the age in seconds after which dcache entries can be reclaimed when memory is short and want_pages is nonzero when shrink_dcache_pages() has been called and the dcache isn't pruned yet.
nr_negative shows the number of unused dentries that are also negative dentries which do not map to any files. Instead, they help speeding up rejection of non-existing files provided by the users.