Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1983535imm; Thu, 24 May 2018 04:02:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoDx0HiRtP9hR6knPCLTbzojs5u3eQpTb3HgfLr4lLleGMqsupPSeWusVreCXejyNeJR8Yq X-Received: by 2002:a17:902:d20c:: with SMTP id t12-v6mr2561421ply.364.1527159726719; Thu, 24 May 2018 04:02:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527159726; cv=none; d=google.com; s=arc-20160816; b=Vg4NCuDPaE1UzYl9BZJov5wvgrmz7S5mroQSMPZoLLo6yFnJnPf8m1IG+lCkQKyrcv liBRTd/RXACJ8TloSV0v7wfp+DKwCQ3JKUssmQMd4dtYA9tnUeNs4coMOKGv0pE20NFs 2T7nUntEEkFkLSsYAzHwmiCtMncWa/O5ow7C+PyprStQaB0H8PUn2ICMqqW2IbmfgaAh 9PEan7Vwa8OSxl7rDDiO1hdotiiadtcdvNtqf2cCjmsB3ilJ7Qvht31YBp4z/FeFcWSr SBSzsfG+l/NOyWjfY5Z8dSpFjh0/wU5kjBLbO431dEiQYnxGqVInerwx9W0xTsUiQfKQ LGRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=0/8oMrxwBSUXAmPyJrLx5pTcYXMiUheaaSE1GxhwCug=; b=l7qVsRzrY3/hd3Ex60qzN5nUFgnFmkui+iJXAjpM0xjm2ZiwTGHSNJYo4p48W024xC 2zZy3UHZyRlyd27y3L5pPOuRcCk0S/87UP9wD2SYEYCfyHFgvVtpIS4MuKbmyBNwZJq6 v2NBxFrHvuNQgyNSljZSpwvnQVsLjQsIETVDtl9ztG3Ek769WlcMLgOvi32flTl8O4aH l5CPZvgOzzw5Rg7od/cJtTr/JFVnWrHdcU96Recs8y5p7ZBEyvR1pt99dm9DECYhCsh0 clapF4lCeqytHL3W4XpeYdtRvLxexhghVoCAetlACR7vucnzBg1IrX582jMqsQSm650v M1Bg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k16-v6si21865698pli.171.2018.05.24.04.01.35; Thu, 24 May 2018 04:02:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030309AbeEXLA1 (ORCPT + 99 others); Thu, 24 May 2018 07:00:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:36134 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030227AbeEXLAY (ORCPT ); Thu, 24 May 2018 07:00:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D64C9AF45; Thu, 24 May 2018 11:00:22 +0000 (UTC) From: Vlastimil Babka To: linux-mm@kvack.org Cc: Roman Gushchin , Michal Hocko , Johannes Weiner , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Mel Gorman , Vijayanand Jitta , Vlastimil Babka Subject: [RFC PATCH 5/5] mm, proc: add NR_RECLAIMABLE to /proc/meminfo Date: Thu, 24 May 2018 13:00:11 +0200 Message-Id: <20180524110011.1940-6-vbabka@suse.cz> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524110011.1940-1-vbabka@suse.cz> References: <20180524110011.1940-1-vbabka@suse.cz> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The vmstat NR_RECLAIMABLE counter is a superset of NR_SLAB_RECLAIMABLE and other non-slab allocations that can be reclaimed via shrinker. Make it visible also in /proc/meminfo and /sys/...node info. Signed-off-by: Vlastimil Babka --- drivers/base/node.c | 2 ++ fs/proc/meminfo.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index a5e821d09656..b35e3627eab7 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -118,6 +118,7 @@ static ssize_t node_read_meminfo(struct device *dev, "Node %d NFS_Unstable: %8lu kB\n" "Node %d Bounce: %8lu kB\n" "Node %d WritebackTmp: %8lu kB\n" + "Node %d Reclaimable: %8lu kB\n" "Node %d Slab: %8lu kB\n" "Node %d SReclaimable: %8lu kB\n" "Node %d SUnreclaim: %8lu kB\n" @@ -138,6 +139,7 @@ static ssize_t node_read_meminfo(struct device *dev, nid, K(node_page_state(pgdat, NR_UNSTABLE_NFS)), nid, K(sum_zone_node_page_state(nid, NR_BOUNCE)), nid, K(node_page_state(pgdat, NR_WRITEBACK_TEMP)), + nid, K(node_page_state(pgdat, NR_RECLAIMABLE)), nid, K(node_page_state(pgdat, NR_SLAB_RECLAIMABLE) + node_page_state(pgdat, NR_SLAB_UNRECLAIMABLE)), nid, K(node_page_state(pgdat, NR_SLAB_RECLAIMABLE)), diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c index 2fb04846ed11..6ca0158a9ebd 100644 --- a/fs/proc/meminfo.c +++ b/fs/proc/meminfo.c @@ -93,10 +93,11 @@ static int meminfo_proc_show(struct seq_file *m, void *v) show_val_kb(m, "Mapped: ", global_node_page_state(NR_FILE_MAPPED)); show_val_kb(m, "Shmem: ", i.sharedram); + show_val_kb(m, "Reclaimable: ", + global_node_page_state(NR_RECLAIMABLE)); show_val_kb(m, "Slab: ", global_node_page_state(NR_SLAB_RECLAIMABLE) + global_node_page_state(NR_SLAB_UNRECLAIMABLE)); - show_val_kb(m, "SReclaimable: ", global_node_page_state(NR_SLAB_RECLAIMABLE)); show_val_kb(m, "SUnreclaim: ", -- 2.17.0