From patchwork Thu May 24 11:00:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 10424143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD56E60327 for ; Thu, 24 May 2018 11:00:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3C872937D for ; Thu, 24 May 2018 11:00:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D819229379; Thu, 24 May 2018 11:00:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D294029376 for ; Thu, 24 May 2018 11:00:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 757426B000E; Thu, 24 May 2018 07:00:25 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7289D6B0266; Thu, 24 May 2018 07:00:25 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 469036B000E; Thu, 24 May 2018 07:00:25 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr0-f198.google.com (mail-wr0-f198.google.com [209.85.128.198]) by kanga.kvack.org (Postfix) with ESMTP id D155F6B000C for ; Thu, 24 May 2018 07:00:24 -0400 (EDT) Received: by mail-wr0-f198.google.com with SMTP id k18-v6so1054435wrm.6 for ; Thu, 24 May 2018 04:00:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=0/8oMrxwBSUXAmPyJrLx5pTcYXMiUheaaSE1GxhwCug=; b=nQlvCbPDfgbzzBrOF3hyKxaOGgjDeHwuuFVpA0Xuk4yN5D3JhnVz1zAQ2BqBGGismL fg3Yg4EM0w2NHIV01ras/MqbiChSs8J/7Iir+WnOC2QZNDSXswrhv5KyTLwnREf6IqGi chj6Kn6dq+GJ63X+YEO9tOFI93iZdGSVWqBuZvyNyLcBYjiTuTRiga0/z8TzEdtxF6QV l40ZyLqS69VOrl9CmIo6sMwvuSp+CcZfgWF3Vv3ijBMGBX80fC0fb3UrW7yoF5WQ0E0L OunX4DfMe/EFdnX7VSkaY7O16g7Sn9D2anYFUt0+7hGBcKSM002Tp9b8FdzJs264z+G2 uYeA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of vbabka@suse.cz designates 195.135.220.15 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Gm-Message-State: ALKqPweyzcMsqgyFs1fQ2fpbYwJQZHD6HIYMbx1Cu2+pJYA3igse2y1q 2RFqe8BYyda84NvtXB7np3IZQaybkBp2QgGRw7CPpFIS7UPQAhZiTrHwioEXT0QQM8LqRZEsGWL VL0Tx57g3WjJj/bPbkPRFHtxzrJyM87+qAOTggYXqsf0pM1nnpj+UI1cO4V3UBit8Rg== X-Received: by 2002:a50:9a44:: with SMTP id o62-v6mr11758975edb.311.1527159624329; Thu, 24 May 2018 04:00:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoUSm7i72Lakjg9PstAXMP+n6E9Km/bNNZMyeJpaSMkTMoKILb/FI+Yk3plVbxRAeQ7eFPO X-Received: by 2002:a50:9a44:: with SMTP id o62-v6mr11758914edb.311.1527159623540; Thu, 24 May 2018 04:00:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527159623; cv=none; d=google.com; s=arc-20160816; b=r633XRIQt704ESGbp4cIIqJdz8bA6iiy/e/2Qww3XBORLoHtwW3WX6C4YIyAi49Ox5 cvFDthzreNd1rj4ssOi6prvrjq73k1lFK4tERa4tNx5Y4EGlic1owQX2RDueOfXb1EyZ eGjeYAyt/UJT1o9FgTUr7rPXRE8aKwfJavGs/KqSOrhnualgvXBlQCIEgQLsFFoSsU3t FKre5yx4EiXYnqztz7OZdYUvdZsSj7VUxEc9Pp/qBdQ7IRbD17KTJmcmn7IP1+nSXgRG AEDUC8oBWuB+tIA/Bf51xPSNNwpTEmZAR3jtDiMZvveWkLzY/n+t7T5nWWoi/hxLBql/ QTcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=0/8oMrxwBSUXAmPyJrLx5pTcYXMiUheaaSE1GxhwCug=; b=DhctbaSjtUTxZ1MD+BYcnFAJ896Vn+WapTBbq7u6ovpz0XzIr3ZbZVFCETZEOfWRiN LuJN2e/vbw43OhNBCTPPJdH5PAafMf0g3EiQpKaX6ugeyIKtzYwjB95golJ3dOiMh1IG FpaOjqlTt/b/TWwxD1YZ6ggCCwOm84tVdwcQExMB12nR5g+BoiSW0BJAypJEhLoTpVis escafZGZaQ3s1PvYYX/H6JQhkn6dD+vITWzM9FFXXztxyJQy3nJ4Ngmf7VdXP11Yc8gs JdUXrieBgqfbdKGk3clft21yMKs9oUtWLrAJfoDhihvq+RZNkmds9ayoGCq5WXqlWECB xZ8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of vbabka@suse.cz designates 195.135.220.15 as permitted sender) smtp.mailfrom=vbabka@suse.cz Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id f44-v6si966016eda.334.2018.05.24.04.00.23 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 24 May 2018 04:00:23 -0700 (PDT) Received-SPF: pass (google.com: domain of vbabka@suse.cz designates 195.135.220.15 as permitted sender) client-ip=195.135.220.15; Authentication-Results: mx.google.com; spf=pass (google.com: domain of vbabka@suse.cz designates 195.135.220.15 as permitted sender) smtp.mailfrom=vbabka@suse.cz 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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: ",