Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3453512ybb; Mon, 23 Mar 2020 01:05:53 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsro/A/u5dngsK2l4TxZ0B6SSPTPK82zzi0cQfAIvRVZqrj1qon6JSWNdXvzyZvYcQCvr6Y X-Received: by 2002:a9d:5781:: with SMTP id q1mr6236908oth.258.1584950753404; Mon, 23 Mar 2020 01:05:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584950753; cv=none; d=google.com; s=arc-20160816; b=yz06EMCu2jAdx+tGZBLmmgmww1LI8rCKAT5K4iMFtH3qH83FbPDQPR3V/L+EWvsF/z 8NNEsG0qx4KuxDYiygi1MvySU/5SbDDRfpQ02HKJAxO+4BmYjpCYviefeMvQEbW7UDhv 69MU7vBKu6KTqtvx7naMNOPZ+xWZEZDG3ZRDFS4jEfRY+QsuBsVtr6eTj+T9usYplRFg 6iGD8dg07Q5argb2DPaeIVGyeyEbHiKFstt7O+fkTgi9xUeLz+UaVx9mqr/ngQAwW6m1 j497KsU9h5Vn5R4QB5EVqwAXhr9O0eMqfftxWoDHYPK3RkWLRNU1N566U0tJPuS/zVdZ 5NZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :dkim-filter; bh=dSYUW03bHzrs9o67DnwnF349vBuzWA6AMzTlkUXfLWo=; b=ealLIeZzYLcDF1qdYVtFdpFma1h8cGl/xO3tyjd2TA9cTvilFZxTgATqjZ+Xd3QvxT VxCG42UNnU1K/uafBNH0qw4lytunuwUycDkbzMuHaPuByQWK+s1nM+JyyWSVBJ/fJJ1V t00bi05cm0GT8CcnjgOSLRfRSn2YDaD/zZL+vLHwYUMeYhQelq1jKdSZYlc928yfB31j /P4fU4ObokydmY33F6EnR1rp7FTQTWo9Hv7m8JRurDKw6AHGdE7FuXji9kRs+hGHttWE XNhxt3jER3oKWEHGnF0E4BdhEzQo3jj0v7xF5DKw1ANkRyLxF4XWLL4BMPhBXCJOfCFM r/7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="c/Cq70Xu"; 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=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q3si7107014oij.157.2020.03.23.01.05.40; Mon, 23 Mar 2020 01:05:53 -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=@samsung.com header.s=mail20170921 header.b="c/Cq70Xu"; 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=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727548AbgCWIFT (ORCPT + 99 others); Mon, 23 Mar 2020 04:05:19 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:46310 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727495AbgCWIFP (ORCPT ); Mon, 23 Mar 2020 04:05:15 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20200323080511epoutp015828bf8ecb3a901b887a4e43c687f88e~_4EZpYkzm0938709387epoutp01h for ; Mon, 23 Mar 2020 08:05:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20200323080511epoutp015828bf8ecb3a901b887a4e43c687f88e~_4EZpYkzm0938709387epoutp01h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1584950711; bh=dSYUW03bHzrs9o67DnwnF349vBuzWA6AMzTlkUXfLWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c/Cq70XueTavKVS2yaajtyGQISate4WyZ7oZSqtZQFwf4a6DvwjItBfnkm0OR2LVw 2VX/3auCyY7O2C7mw8yH5jkZ7Hswc50BfXw6jn/HRihKV0o0yrU0hAWDq5zfoShaHe krQpzu0Er2Cio6ru0MQmbAPIkhGgH0m+j9xLR008= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20200323080511epcas1p1e045fa882c46a59520affd8470248956~_4EZAIXBi2159621596epcas1p1G; Mon, 23 Mar 2020 08:05:11 +0000 (GMT) Received: from epsmges1p1.samsung.com (unknown [182.195.40.163]) by epsnrtp2.localdomain (Postfix) with ESMTP id 48m6PJ58TyzMqYkg; Mon, 23 Mar 2020 08:05:08 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id E1.70.04145.4BD687E5; Mon, 23 Mar 2020 17:05:08 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200323080508epcas1p2dfe6517169a65936e5ab10c4e63a19a7~_4EWKChal2331623316epcas1p28; Mon, 23 Mar 2020 08:05:08 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200323080508epsmtrp1e95a6cc4a2e1e35601c95ad2b01b48c9~_4EWIopZ50063700637epsmtrp1f; Mon, 23 Mar 2020 08:05:08 +0000 (GMT) X-AuditID: b6c32a35-2a5ff70000001031-37-5e786db4bb01 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id C7.73.04024.4BD687E5; Mon, 23 Mar 2020 17:05:08 +0900 (KST) Received: from jaewon-linux.10.32.193.11 (unknown [10.253.104.82]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200323080507epsmtip1af2b09b7d835e20c46018369fa326f2f~_4EV5mw5Z3157831578epsmtip1N; Mon, 23 Mar 2020 08:05:07 +0000 (GMT) From: Jaewon Kim To: gregkh@linuxfoundation.org, leon@kernel.org, vbabka@suse.cz, adobriyan@gmail.com, akpm@linux-foundation.org, labbott@redhat.com, sumit.semwal@linaro.org, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, kasong@redhat.com, bhe@redhat.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, jaewon31.kim@gmail.com, linux-api@vger.kernel.org, kexec@lists.infradead.org, Jaewon Kim Subject: [RFC PATCH v2 2/3] mm: zsmalloc: include zs page size in meminfo extra Date: Mon, 23 Mar 2020 17:05:02 +0900 Message-Id: <20200323080503.6224-3-jaewon31.kim@samsung.com> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20200323080503.6224-1-jaewon31.kim@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA01TbUxTVxjOube994J23FzdPEHC2E1mgkuhtbScTViWaLabQRRjJHFZYDfl hBJvP9JbFPWHVAmyQqUSDaPSBT9QqRBMSwYodqaSjAzn5xgTrVF/qJhAFYcayOZabs3273nf 93nO877vOYchuVEqk6mxubDTJko8la766UquVjtgravQ9UVzUbv7a9TZ30uh6w8WKHTgZD+F msMdAHnjzwh0ZnYcoIvj8wTqGXlDoCML3SQKv26i0O0LnRS63/tWjU7Px2l0vsFPo0e+NgL9 GntJo2PuQ+ALThj2x2ghFPyeEkJzbbRw748RShj7YVEl/BzopYXwqX1CPDJBCYcGgkC42jVK C8NzYbXwMpRdtvwbqciCxSrszME2s72qxlZdzJdsrdxQaTTp9Fr9p6iQz7GJVlzMbywt035Z IyXG43N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5d AldG260X7AUTuCo+vDzC0sA4i6OLkZNDQsBE4uPdOaxdjFwcQgK7GSWebX3NBpGQkXhz/ilL FyMHkC0scfhwMUhYSOAro8Tcy/EgNpuAtsT7BZNYQWwRgflMEv3t/CBzmAU2M0pMXNrMApIQ FvCXmDJpITOIzSKgKjGheztYnFfARmLlyjtQ8+UlFv4HK+EUsJXYd+kWG8QuG4mt3c+YJzDy LWBkWMUomVpQnJueW2xYYJiXWq5XnJhbXJqXrpecn7uJERwjWpo7GC8viT/EKMDBqMTDe6O3 PE6INbGsuDL3EKMEB7OSCO/m1Io4Id6UxMqq1KL8+KLSnNTiQ4zSHCxK4rxP845FCgmkJ5ak ZqemFqQWwWSZODilGhgdq2s3egb8jnmwbmcVnwPrn7bpync2HNa5MafyhfgS6edT4ltYw5nm zBU/Yb5BoDM7bEOEDW9Jz3f/Le90Nk2pOv774ZETNY5uDx62PYg9qRaYsfd19sGqubEuNxW1 nBp7zT2bEjTnK2jOZWzY9tp2upARu4BGpjXD8hWmHksYlxU3We7U7VRiKc5INNRiLipOBACx /fqvjQIAAA== X-CMS-MailID: 20200323080508epcas1p2dfe6517169a65936e5ab10c4e63a19a7 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200323080508epcas1p2dfe6517169a65936e5ab10c4e63a19a7 References: <20200323080503.6224-1-jaewon31.kim@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On most of recent Android device use DRAM memory based compressed swap to save free memory. And the swap device size is also big enough. The zsmalloc page size is alread shown on vmstat by commit 91537fee0013 ("mm: add NR_ZSMALLOC to vmstat"). If the size is also shown in /proc/meminfo_extra, it will be better to see system wide memory usage at a glance. To include heap size, use register_meminfo_extra introduced in previous patch. i.e) cat /proc/meminfo_extra | grep ZsPages IonSystemHeap: 242620 kB ZsPages: 203860 kB i.e.) show_mem on oom <6>[ 420.856428] Mem-Info: <6>[ 420.856433] ZsPages:44114kB Signed-off-by: Jaewon Kim --- mm/zsmalloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 22d17ecfe7df..9d5682aa44ac 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -2566,6 +2566,7 @@ static int __init zs_init(void) zs_stat_init(); + register_meminfo_extra(&vm_zone_stat[NR_ZSPAGES], 0, "ZsPages"); return 0; hp_setup_fail: @@ -2583,6 +2584,7 @@ static void __exit zs_exit(void) cpuhp_remove_state(CPUHP_MM_ZS_PREPARE); zs_stat_exit(); + unregister_meminfo_extra(&vm_zone_stat[NR_ZSPAGES]); } module_init(zs_init); -- 2.13.7