Welcome! Log In Create A New Profile


I think /proc/sys/fs/dentry-state is documented wrong

Posted by Mark Seger 
When I look at 'man proc', as well as sar (which I'm guessing took its definitions from the man page) I'm told the first two fields of dentry-state are:

nr_dentry is the number of allocated dentries (dcache entries). This field is unused in Linux 2.2.
nr_unused is the number of unused dentries.

and I don't believe either of them. For example, if the second is really unused dentries, why would the number increase as I create more directories. I also noticed that this number is close to what is reported in /proc/slabinfo and if I display them both close to the same time here's what I see:

[root@d9t0086g ~]# grep dentry /proc/slabinfo; cat /proc/sys/fs/dentry-state
dentry 2694396 2694420 192 20 1 : tunables 120 60 8 : slabdata 134721 134721 0
2694338 2688587 45 0 0 0

It sure feelss like the second field in dentry state is the number of allocated dentry slabs but it still doesn't explain what the 2nd number means. however since the first field is not an exact (or even close) match to /proc/slabinfo I'm wondering if there might be a bug too!

It almost feels like this may have been something that might have been implemented earlier and then changed w/o anyone updating the man page or dentry-state processing. Then again it may simply be a matter of getting this documented clearly and everything will then be crystal clear.

can anyone shed some reality on this?

You can learn here how to solve this problem. It will be good for you, friend. Trust me.
Great article. I found this much informative, as what I am looking for exactly. Thanks for such post and please keep it up.


Your Email:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 15 plus 11?