lkml.org 
[lkml]   [2018]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: don't show nr_indirectly_reclaimable in /proc/vmstat
On Wed, 25 Apr 2018, Roman Gushchin wrote:

> 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.
>

I don't think it should be a per-node vmstat, in this case. It appears
only to be used for the global context. Shouldn't this be handled like
totalram_pages, total_swap_pages, totalreserve_pages, etc?

> 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');

\
 
 \ /
  Last update: 2018-04-25 21:37    [W:0.089 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site