Received: by 10.192.165.148 with SMTP id m20csp1104100imm; Wed, 25 Apr 2018 12:39:13 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Pu8A8HX/RE7Li8csEaFaUwclTmebEs4tmqLrr3Ab1F1v7ZgXfon17wUcXmGjdSxjl4Ft+ X-Received: by 2002:a17:902:c24:: with SMTP id 33-v6mr29832649pls.88.1524685153179; Wed, 25 Apr 2018 12:39:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524685153; cv=none; d=google.com; s=arc-20160816; b=M8LlWZLWtdT0x9w1FlZQD1vjh8R93NEhArLsoJEQiFPn36Xdieo0B9SpDi5HLE5ii9 4b13+v3A4ZBWsy0U1G7500p27O8YFRrTwtS5NEIm+j0BJFzBW/5XodkB74N3p6F3+BJB Tnphv/2BGUeeQGSB0ztI9JGvK6GwS/p3NW2/yKF9aHxW8OjdmOqajIaRCZ/QsBNcVNVK aFhme62vfInbPjcTTCEUkEMWul5DMAnAW6pH4k0/ipx+/+gBTyGEZlHS+VEO7wpHVPz+ m3k74xVJVvgi0ETSXaLIIYqMgFx7IjYzvlo55zdzaOS6tpA4vh5ibl64xbDEEQxLliMf ug1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=8zeuMnLymGK2xYFtZ5e+pxJyYIXTTbyE01yl1GFl3Mw=; b=zI9Rc7teIgn2DqCQfAj5gH3G09Zqj4W8yfZcp02xshvrPXpOAXZZcyPGN1puA0tbJm fAMhIQQ4aDYwS/HvRk24LQT3OPz+jH2Snipfqh4pytdgdOT+b8qZLYdGH7BsCOROVO7K fAJwnawU3qO3KxqHPaQFV2TwzkB9vcF2Pw9GzJH8l+VUgzGsO48051AItTXBjEeV/xQR OGZB3wczs03rn8HiW8S6tT8+igEe5mTdvWpOhxr0X8Ug8Rg80pMuBH5VGvkGChp1Pv5j PJXWMHJx1lEaAcmCM7vpJaTtWlsqvc248qDCmjxT+vMyowcXAusXOmi5IumWesCSiGay BavQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hJuKqu5C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1-v6si17758677plr.410.2018.04.25.12.38.58; Wed, 25 Apr 2018 12:39:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hJuKqu5C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756203AbeDYThc (ORCPT + 99 others); Wed, 25 Apr 2018 15:37:32 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34131 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751344AbeDYTh2 (ORCPT ); Wed, 25 Apr 2018 15:37:28 -0400 Received: by mail-pf0-f196.google.com with SMTP id a14so5579153pfi.1 for ; Wed, 25 Apr 2018 12:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=8zeuMnLymGK2xYFtZ5e+pxJyYIXTTbyE01yl1GFl3Mw=; b=hJuKqu5CPs4gsShog+Qqf5CSwPhnaMFiu573n1sf1Py7I+b0PnRcinUMTj6zNUKvim UIAL+4szOV+a+3k0RlVV4R3oqBfOkWDvipx+XL1aPQDZ8otV+gUY7inhg/WWyy7K1zdR cCUqCcNBnxOfAbYWCqoDGh3ADRj5ZZWQlHeI2R/GlH9p6Nlo+62V04TaRv7hXyPej286 XCZS1ydLqzhqKi915hLojt0x75/YbUnkWHuh8dJLLLi3tkLO0Drnp3/NZWwUz3gngmxH VJ5iJmp1dejajvdEjfIY+4CDl21zIpV9n4bbIlruWlRQgg6aYPGHaiBsU/EZRnHCBz+n D4ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=8zeuMnLymGK2xYFtZ5e+pxJyYIXTTbyE01yl1GFl3Mw=; b=B2B8hA2XViBeQceobI0dboGPY5ZrAR+PPg9X9U7ZH7WKd2+pMIW5OOI7KP9+uhSsgb vvDe5jdmTJekzIdIu8UYueSHcn3R5CW9pbNwVdj2Acs6XMGLV1HVUpiPp7bImZXUbM57 X+mw251FVW11CJIiuc7Q72zqrR4QNaPSF2H5uWzt8jBHijwCJD4XBl+Fn2/ff32KPk3i BsqCp2SvG6nnobj9WrvBTuOOKC+sbUetkDoJve2tbXYv6563zAIKzaNy4fxI2FMKMC+d 8U6XQZHMPsugSjQTIh24Y36woZbpHMjzsyVGv9MagqFo8bNUh4UhJ4yEJ4Jp7XR6jXFA 3oaA== X-Gm-Message-State: ALQs6tCE+yflRcLjFrwlCSLUiDdNzf7WbYpGZcKDKMwUPXyrvw7HTnGf fiKd66MlKgOj1qE6CHbvvEc9eIRgMyg= X-Received: by 10.101.77.199 with SMTP id q7mr25150448pgt.305.1524685047633; Wed, 25 Apr 2018 12:37:27 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id r81sm37627770pfj.79.2018.04.25.12.37.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Apr 2018 12:37:26 -0700 (PDT) Date: Wed, 25 Apr 2018 12:37:26 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Roman Gushchin cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, kernel-team@fb.com, Vlastimil Babka , Matthew Wilcox , Andrew Morton , Alexander Viro , Michal Hocko , Johannes Weiner Subject: Re: [PATCH] mm: don't show nr_indirectly_reclaimable in /proc/vmstat In-Reply-To: <20180425191422.9159-1-guro@fb.com> Message-ID: References: <20180425191422.9159-1-guro@fb.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Cc: Vlastimil Babka > Cc: Matthew Wilcox > Cc: Andrew Morton > Cc: Alexander Viro > Cc: Michal Hocko > Cc: Johannes Weiner > --- > 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');