linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: don't show nr_indirectly_reclaimable in /proc/vmstat
@ 2018-04-25 19:14 Roman Gushchin
  2018-04-25 19:36 ` Vlastimil Babka
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Roman Gushchin @ 2018-04-25 19:14 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, linux-api, kernel-team, Roman Gushchin,
	Vlastimil Babka, Matthew Wilcox, Andrew Morton, Alexander Viro,
	Michal Hocko, Johannes Weiner

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

Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
---
 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_vmscan_immediate_reclaim",
 	"nr_dirtied",
 	"nr_written",
-	"nr_indirectly_reclaimable",
+	"", /* nr_indirectly_reclaimable */
 
 	/* enum writeback_stat_item counters */
 	"nr_dirty_threshold",
@@ -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');
-- 
2.14.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-04-30 15:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 19:14 [PATCH] mm: don't show nr_indirectly_reclaimable in /proc/vmstat Roman Gushchin
2018-04-25 19:36 ` Vlastimil Babka
2018-04-25 19:37 ` David Rientjes
2018-04-25 21:01   ` Roman Gushchin
2018-04-25 21:20     ` David Rientjes
2018-04-26 20:03 ` Michal Hocko
2018-04-26 21:55   ` David Rientjes
2018-04-27  9:17     ` Vlastimil Babka
2018-04-27 10:55       ` Roman Gushchin
2018-04-27 11:06         ` Vlastimil Babka
2018-04-27 18:41       ` David Rientjes
2018-04-27 18:57         ` Matthew Wilcox
2018-04-30 15:30         ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).