[Devel] [PATCH RHEL7 COMMIT] ve/proc: Port diff-ve-proc-add-buffers-field-to-meminfo

Konstantin Khorenko khorenko at virtuozzo.com
Wed Jun 24 03:42:17 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.17
------>
commit d0dfe3c31c0151e09757da279012c7831d8a969e
Author: Vladimir Davydov <vdavydov at parallels.com>
Date:   Wed Jun 24 14:42:16 2015 +0400

    ve/proc: Port diff-ve-proc-add-buffers-field-to-meminfo
    
    Author: Dmitry Guryanov
    Email: dguryanov at parallels.com
    Subject: proc: add Buffers field to meminfo
    Date: Mon, 5 Aug 2013 16:22:03 +0400
    
    A Customer has experienced a problem with some reporting tool
    which wants Buffers: string in meminfo.
    Strings in meminfo in ve0 and container was the same on 2.6.18,
    but on 2.6.32 they are different. Let's add only Buffers: string
    now and check if it will fix the problem.
    
    https://jira.sw.ru/browse/PSBM-19448
    
    Signed-off-by: Dmitry Guryanov <dguryanov at parallels.com>
    
    Acked-by: Konstantin Khlebnikov <khlebnikov at openvz.org>
    =============================================================================
    
    Actually, we need to show something meaningful there now, because
    buffers are now accounted to CT RAM via kmemcg - will be done in the
    scope of PSBM-34444.
    
    Related to https://jira.sw.ru/browse/PSBM-33650
    
    Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
 fs/proc/meminfo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
index e352241..16960f7 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -31,6 +31,7 @@ static int meminfo_proc_show_mi(struct seq_file *m, struct meminfo *mi)
 		"MemTotal:       %8lu kB\n"
 		"MemFree:        %8lu kB\n"
 		"Cached:         %8lu kB\n"
+		"Buffers:        %8lu kB\n"
 		"Active:         %8lu kB\n"
 		"Inactive:       %8lu kB\n"
 		"Active(anon):   %8lu kB\n"
@@ -52,6 +53,7 @@ static int meminfo_proc_show_mi(struct seq_file *m, struct meminfo *mi)
 		K(mi->si->totalram),
 		K(mi->si->freeram),
 		K(mi->cached),
+		K(0L),
 		K(mi->pages[LRU_ACTIVE_ANON]   + mi->pages[LRU_ACTIVE_FILE]),
 		K(mi->pages[LRU_INACTIVE_ANON] + mi->pages[LRU_INACTIVE_FILE]),
 		K(mi->pages[LRU_ACTIVE_ANON]),



More information about the Devel mailing list