[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <35FD53F367049845BC99AC72306C23D103EDAF89E160@CNBJMBX05.corpusers.net>
Date: Fri, 26 Dec 2014 19:56:49 +0800
From: "Wang, Yalin" <Yalin.Wang@...ymobile.com>
To: "'minchan@...nel.org'" <minchan@...nel.org>,
'Konstantin Khlebnikov' <koct9i@...il.com>,
"'Kirill A. Shutemov'" <kirill@...temov.name>,
'Andrew Morton' <akpm@...ux-foundation.org>,
"'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>,
"'linux-mm@...ck.org'" <linux-mm@...ck.org>,
"'linux-arm-kernel@...ts.infradead.org'"
<linux-arm-kernel@...ts.infradead.org>,
"'n-horiguchi@...jp.nec.com'" <n-horiguchi@...jp.nec.com>,
"'pintu.k@...sung.com'" <pintu.k@...sung.com>
Subject: [RFC] mm:change meminfo cached calculation
This patch subtract sharedram from cached,
sharedram can only be swap into swap partitions,
they should be treated as swap pages, not as cached pages.
Signed-off-by: Yalin Wang <yalin.wang@...ymobile.com>
---
fs/proc/meminfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
index d3ebf2e..2b598a6 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -45,7 +45,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
committed = percpu_counter_read_positive(&vm_committed_as);
cached = global_page_state(NR_FILE_PAGES) -
- total_swapcache_pages() - i.bufferram;
+ total_swapcache_pages() - i.bufferram - i.sharedram;
if (cached < 0)
cached = 0;
--
2.1.3
Powered by blists - more mailing lists