From bfe3637f898b1fa98116f037e35ba85f0558f389 Mon Sep 17 00:00:00 2001 From: Vijayanand Jitta Date: Mon, 4 Mar 2019 15:27:50 +0530 Subject: [PATCH] mm: introduce NR_UNRECLAIMABLE_PAGES Introduce NR_UNRECLAIMABLE_PAGES memory counter which accounts the pages that cannot be reclaimed under memory pressure. Change-Id: I9afe50537b0d3c2e7ffc07916b23cce4329e3679 Signed-off-by: Vijayanand Jitta [guptap@codeaurora.org: split resident_page_types change] Signed-off-by: Prakash Gupta --- include/linux/mmzone.h | 3 +++ mm/vmstat.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 560df1ae3a3e..8b38347aaf18 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -259,6 +259,9 @@ enum node_stat_item { NR_DIRTIED, /* page dirtyings since bootup */ NR_WRITTEN, /* page writings since bootup */ NR_KERNEL_MISC_RECLAIMABLE, /* reclaimable non-slab kernel pages */ +#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES + NR_UNRECLAIMABLE_PAGES, +#endif NR_VM_NODE_STAT_ITEMS }; diff --git a/mm/vmstat.c b/mm/vmstat.c index ee82ac8523bb..61026e1289fe 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1170,6 +1170,9 @@ const char * const vmstat_text[] = { "nr_dirtied", "nr_written", "nr_kernel_misc_reclaimable", +#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES + "nr_unreclaimable_pages", +#endif /* enum writeback_stat_item counters */ "nr_dirty_threshold",