[procps] [OmegaPhil@xxxxxxxxxxxxx: Bug#799716: free considers 'cached' to include SUnreclaim]

  • From: Craig Small <csmall-procps@xxxxxxxxxx>
  • To: Procps-ng Mail list <procps@xxxxxxxxxxxxx>
  • Date: Tue, 22 Sep 2015 22:10:38 +1000

I got this bug report about the new way we calculate cached. Can someone
who was closer to this part of the code look into it and see if

cached != page_cache + slab?
----- Forwarded message from OmegaPhil <OmegaPhil@xxxxxxxxxxxxx> -----
This appears to be a followon from '#565518: procps: free does not take
slab into account in used - buffers/cache' (I've CC'd you in Nico since
you'll probably be interested).

In proc/sysinfo.c:meminfo, kb_main_cached is calculated as the following:

kb_main_cached = kb_page_cache + kb_slab;

This is wrong as kb_slab includes SUnreclaim - presumably this should be
kb_slab_reclaimable?

Part of the conky investigation in
https://github.com/brndnmtthws/conky/issues/130
----- End forwarded message -----

--
Craig Small (@smallsees) http://enc.com.au/ csmall at : enc.com.au
Debian GNU/Linux http://www.debian.org/ csmall at : debian.org
GPG fingerprint: 5D2F B320 B825 D939 04D2 0519 3938 F96B DF50 FEA5

Other related posts: