[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180426200331.GZ17484@dhcp22.suse.cz>
Date: Thu, 26 Apr 2018 22:03:31 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Roman Gushchin <guro@...com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linux-api@...r.kernel.org, kernel-team@...com,
Vlastimil Babka <vbabka@...e.cz>,
Matthew Wilcox <willy@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH] mm: don't show nr_indirectly_reclaimable in /proc/vmstat
On Wed 25-04-18 20:14:22, 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.
>
> Signed-off-by: Roman Gushchin <guro@...com>
> Cc: Vlastimil Babka <vbabka@...e.cz>
> Cc: Matthew Wilcox <willy@...radead.org>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Alexander Viro <viro@...iv.linux.org.uk>
> Cc: Michal Hocko <mhocko@...e.com>
> Cc: Johannes Weiner <hannes@...xchg.org>
This is quite a hack. I would much rather revert the counter and fixed
it the way Vlastimil has proposed. But if there is a strong opposition
to the revert then this is probably the simples thing to do. Therefore
Unhappy-Acked-by: Michal Hocko <mhocko@...e.com>
> ---
> 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
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists