From: Chen Wandun chenwandun@huawei.com
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: Chen Wandun chenwandun@huawei.com Reviewed-by: Kefeng Wang wangkefeng.wang@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- mm/mem_reliable.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/mm/mem_reliable.c b/mm/mem_reliable.c index 796892d5d0560..d4458d7401945 100644 --- a/mm/mem_reliable.c +++ b/mm/mem_reliable.c @@ -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)); + } } }