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 --- mm/mem_reliable.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/mm/mem_reliable.c b/mm/mem_reliable.c index 5d75ab6482db..6c0b931b9071 100644 --- a/mm/mem_reliable.c +++ b/mm/mem_reliable.c @@ -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)