提交 ccad5e7a 编写于 作者: C Chen Wandun 提交者: Wang Wensheng

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>
上级 33c4a18f
......@@ -116,6 +116,14 @@ void reliable_report_meminfo(struct seq_file *m)
show_val_kb(m, "ReliableTotal: ", total_reliable_pages());
show_val_kb(m, "ReliableUsed: ", used_reliable_pages());
show_val_kb(m, "ReliableBuddyMem: ", free_reliable_pages());
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);
show_val_kb(m, "FileCache: ", num);
}
}
static int __init setup_reliable_debug(char *str)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册