提交 c05f56c6 编写于 作者: C Chen Wandun 提交者: Yang Yingliang

proc/meminfo: add "FileCache" item in /proc/meminfo

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S
CVE: NA

--------------------------------
Item "FileCache" in /proc/meminfo show the number of page cache
in LRU(active + inactive).
Signed-off-by: NChen Wandun <chenwandun@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 925368d8
......@@ -165,6 +165,17 @@ void reliable_report_meminfo(struct seq_file *m)
&reliable_shmem_used_nr_page) << (PAGE_SHIFT - 10);
seq_printf(m, "ReliableShmem: %8lu kB\n", shmem);
}
if (pagecache_reliable_is_enabled()) {
unsigned long num = 0;
num += global_node_page_state(NR_LRU_BASE +
LRU_ACTIVE_FILE);
num += global_node_page_state(NR_LRU_BASE +
LRU_INACTIVE_FILE);
seq_printf(m, "FileCache: %8lu kB\n",
num << (PAGE_SHIFT - 10));
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册