Linux Kernels

mm: don't show nr_indirectly_reclaimable in /proc/vmstat

This change “mm: don't show nr_indirectly_reclaimable in /proc/vmstat” (commit 7aaf772) in Linux kernel is authored by Roman Gushchin <guro [at]> on Fri May 11 16:01:53 2018 -0700.

Description of "mm: don't show nr_indirectly_reclaimable in /proc/vmstat"

The change “mm: don't show nr_indirectly_reclaimable in /proc/vmstat” introduces changes as follows.

mm: don't show nr_indirectly_reclaimable in /proc/vmstat

Don't show nr_indirectly_reclaimable in /proc/vmstat, because there is
no need to export this vm counter to userspace, and some changes are
expected in reclaimable object accounting, which can alter this counter.

Signed-off-by: Roman Gushchin <>
Acked-by: Vlastimil Babka <>
Reviewed-by: Andrew Morton <>
Cc: Matthew Wilcox <>
Cc: Alexander Viro <>
Cc: Michal Hocko <>
Cc: Johannes Weiner <>
Cc: David Rientjes <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>

Linux kernel releases containing commit 7aaf772

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes in "mm: don't show nr_indirectly_reclaimable in /proc/vmstat"

There are 6 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 mm/vmstat.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 536332e988b8..a2b9518980ce 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1161,7 +1161,7 @@ const char * const vmstat_text[] = {
-	"nr_indirectly_reclaimable",
+	"", /* nr_indirectly_reclaimable */
 	/* enum writeback_stat_item counters */
@@ -1740,6 +1740,10 @@ static int vmstat_show(struct seq_file *m, void *arg)
 	unsigned long *l = arg;
 	unsigned long off = l - (unsigned long *)m->private;
+	/* Skip hidden vmstat items. */
+	if (*vmstat_text[off] == '\0')
+		return 0;
 	seq_puts(m, vmstat_text[off]);
 	seq_put_decimal_ull(m, " ", *l);
 	seq_putc(m, '\n');

The commit for this change in Linux stable tree is 7aaf772 (patch).

Last modified: 2020/01/11 09:50