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

  • From: Craig Small <csmall@xxxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Sat, 24 Oct 2015 14:36:21 +1100

On Sun, Oct 11, 2015 at 06:19:24PM +0100, OmegaPhil wrote:

Since this has apparently gone nowhere, I've had a look into this -
'Available' is a new stat added in January 2014 which aims to give the
users a figure of memory available that, once used, will cause kswapd to
start swapping pages out - here is the commit adding it:

https://github.com/torvalds/linux/commit/34e431b0ae398fc54ea69ff85ec700722c9da773
That's an interesting read. It probably means used should be total -
available.


Separate to this, the available calculation
(fs/proc/meminfo.c:meminfo_proc_show) only takes into account
NR_SLAB_RECLAIMABLE and therefore ignores NR_SLAB_UNRECLAIMABLE - this
I have now changed so that cached only includes reclaimable. This is in
both the master and newlib branches. Thanks for your digging on this
to find some references.

https://gitlab.com/procps-ng/procps/commit/05d751c4f076a2f0118b914c5e51cfbb4762ad8e

- Craig

--
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: