procps/0058-library-reverting-tmpfs-subtraction-from-cached-18-F.patch

63 lines
2.0 KiB
Diff

Based on 2f96eef7f86a12b81badef1c91ec2d503ae4029d Mon Sep 17 00:00:00 2001
From: Jaromir Capik <jcapik@redhat.com>
Date: Wed, 30 Apr 2014 13:59:34 +0200
Subject: [PATCH] library: reverting tmpfs subtraction from cached
(18-FEB-2014)
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 | 4 +---
proc/sysinfo.c | 2 --
vmstat.8 | 3 +--
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git free.1 free.1
index 21cce28..85efef8 100644
--- free.1
+++ 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
diff --git proc/sysinfo.c proc/sysinfo.c
index e07ca86..85fb0a4 100644
--- proc/sysinfo.c
+++ proc/sysinfo.c
@@ -695,8 +695,6 @@ nextline:
}
if ((ev=getenv("PS_FULL_CACHE")))
kb_main_cached += kb_swap_reclaimable + kb_swap_cached + kb_nfs_unstable;
- /* "Cached" includes "Shmem" - we want only the page cache here */
- kb_main_cached -= kb_main_shared;
}
/*****************************************************************/
diff --git vmstat.8 vmstat.8
index 2782a42..420d9f3 100644
--- vmstat.8
+++ 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
--
1.7.9.2