]> granicus.if.org Git - procps-ng/commitdiff
library: reverting tmpfs subtraction from cached (18-FEB-2014)
authorJaromir Capik <jcapik@redhat.com>
Wed, 30 Apr 2014 11:59:34 +0000 (13:59 +0200)
committerJaromir Capik <jcapik@redhat.com>
Wed, 30 Apr 2014 11:59:34 +0000 (13:59 +0200)
The subtraction was marked as reinforcing the misconception,
that memory in the page cache can be considered free.
The Cached value is not a sum of page cache and tmpfs,
as the tmpfs memory lives in the page cache and therefore
it's an inseparable part of it.

free.1
proc/sysinfo.c
vmstat.8

diff --git a/free.1 b/free.1
index 21cce28a495bf333d39afb281538806b409b1f0c..85efef88e2a0884ca96dfd73fd4474ad4bb2be84 100644 (file)
--- a/free.1
+++ b/free.1
@@ -32,9 +32,7 @@ kernels 2.6.32, displayed as zero if not available)
 Memory used by kernel buffers (Buffers in /proc/meminfo)
 .TP
 \fBcached\fR
-Memory used by the page cache  (calculated as Cached - Shmem in
-/proc/meminfo - the Cached value is actually the sum of page cache and
-tmpfs memory)
+Memory used by the page cache (Cached in /proc/meminfo)
 .SH OPTIONS
 .TP
 \fB\-b\fR, \fB\-\-bytes\fR
index e07ca8669051abcce072d322d6a246563ba7e8a1..85fb0a430945c67764f461e66ffe0a8de8443517 100644 (file)
@@ -682,8 +682,6 @@ nextline:
   }
   kb_swap_used = kb_swap_total - kb_swap_free;
   kb_main_used = kb_main_total - kb_main_free;
-  /* "Cached" includes "Shmem" - we want only the page cache here */
-  kb_main_cached -= kb_main_shared;
 }
 
 /*****************************************************************/
index 2782a427dd32f2917b1bb677497bc086bfd9d11f..420d9f394b373828cf0d805ae11d848f745d8717 100644 (file)
--- a/vmstat.8
+++ b/vmstat.8
@@ -102,8 +102,7 @@ b: The number of processes in uninterruptible sleep.
 swpd: the amount of virtual memory used.
 free: the amount of idle memory.
 buff: the amount of memory used as buffers.
-cache: the amount of memory used as cache (excluding tmpfs memory for
-kernels 2.6.32+)
+cache: the amount of memory used as cache.
 inact: the amount of inactive memory.  (\-a option)
 active: the amount of active memory.  (\-a option)
 .fi