From patchwork Fri Sep 15 10:58:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Shixin X-Patchwork-Id: 13386790 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A283EE644C for ; Fri, 15 Sep 2023 10:06:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 38E256B033C; Fri, 15 Sep 2023 06:06:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 33F5B6B033E; Fri, 15 Sep 2023 06:06:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 22D406B033F; Fri, 15 Sep 2023 06:06:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 144356B033C for ; Fri, 15 Sep 2023 06:06:05 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id DA2EC160FC7 for ; Fri, 15 Sep 2023 10:06:04 +0000 (UTC) X-FDA: 81238401048.17.6B12CBD Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf20.hostedemail.com (Postfix) with ESMTP id C13E61C0032 for ; Fri, 15 Sep 2023 10:06:01 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf20.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=liushixin2@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694772363; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=5RFyJJ5/liGoaN6Ic2klPw7Hqun52/OtqYu+AIB/oGA=; b=IDp/ywkw0Ugt+kvyXFmPTvYgqSqjon1HtuuQailj2i8vW7FYdeP73Dq1gVC6u7Via67raw ZcyK19qXr/Kks7zIb8m0GMFZ1hrHlgqSZ2chWB76hqppoXYOgdPtmFdg/d66fqlRUQNUKY 5orlGao4moqd59TDgo4FC6B3QWzGgMM= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf20.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=liushixin2@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694772363; a=rsa-sha256; cv=none; b=Qi/qVTyFkSfw/uXZ3eHWAfxrtbcXx7wzmxRJONLN3swh0aIiXRR0OLAqZr7ViO5SUQTUzu 90YGKwvjvW0788iOmSHnxT1JUF+wIETvsoa0CA4ba6kp2Kxcos5GKPBmYWA4ivi9cElbfq bdwX5Cx3DA5/mTA2OQhVQdo3sfmR0tk= Received: from dggpemm500009.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Rn8pc3XFnzNnfn; Fri, 15 Sep 2023 18:01:12 +0800 (CST) Received: from huawei.com (10.175.113.32) by dggpemm500009.china.huawei.com (7.185.36.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 15 Sep 2023 18:04:56 +0800 From: Liu Shixin To: Andrew Morton , Yosry Ahmed , =?utf-8?q?Michal_Koutn=C3=BD?= , Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Michal Hocko , Kefeng Wang CC: , , Liu Shixin Subject: [PATCH v2 0/2] Expose swapcache stat for memcg v1 Date: Fri, 15 Sep 2023 18:58:43 +0800 Message-ID: <20230915105845.3199656-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500009.china.huawei.com (7.185.36.225) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: C13E61C0032 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: xxm43u136dwoug66nuioknjrpswg98s3 X-HE-Tag: 1694772361-694420 X-HE-Meta: U2FsdGVkX1+MAqNmPxfe1kApp+YSq+d9cDIo0esYDDNQU0aUSQZlIlChoFqUWQ8upsBEy0QzqyLnjTies28KDJNsS+N19BBvtTjmBm3NHpXGOhSUV5tY+jDYzA+YRa4DsaBMNee56NzDRoN9hwc19+vgqZTpl20WJskzsWtP5M/xlj8Fs1kXr9196gC115816RddjPPUYjK3pO3mMg4l7LsEPXOQNWsNDHe8VhR+qLGXTRRh40aZcXqnIXEg/5EW5v5CeOcdzDKtjJef3ZbC2aI/DGP4cYGBcVo82Q61SisdIqyLeHnS8X6nY8ccKWE/BDXUqfgLgNSO7KsqkzE0Vuol8YcjBuEPmsizzQRJZXM0Nh2L4pmkCRxOR4bRT3LbWFqUXlet27yfhrWOQsMUIUbko+obkmeLJ7or0BzdXUpsuOlm2YXdxCbUjQDrvbNn5y5ruHZM3ib2I8TzQNfAmXYpePejfKBtAH4/NFbNo1WOUg9jMp4wRQzbYUSrpShMQNozAoyYaZTeW92ZVVtDLwmdXlbnD8/jUoZbImax3WZ5+7hE4/as6A5bA+GHmNqHChq4CyUuwg3jMzmgyN0niOoBj90c53rxJMx/LRskm6RdKhLDx0Zb+rgjYi063YnuXdbrU+PFidGT7NxkAa63tpl+Zef/aaPCY7xfNPJ91dDAUECLpRlUZOAB2UjGo4odeuNCPWZp/SdSfEVDeAb0ITcPhjbwWYh71lIbymez1hXjYXFTfWmbfASapVBjGQGelwWR3uExQ1thZn7uktH3z6uvjJJFYxnIA2njuo2umZu9Lf/OiJ3HQXgk6MQLx/6ZbNUDabEhBb/0Cyx4KXzA0kqL2yK4KuVjiqj+8rL6N9PbNLNfjJSUxTRQhM6X1i6ytEhl/RJoi2r+XVZYTO0f9yCw541lEOoj+ELiesF+pvJ0dJhuCYRFOX+WQL0YfuJv7xRhu8AMKgsi1ZZuVA4 3dki43gF +bBn1/GdMzPT8REmdwVVg4HpRWAc3v/JEv5nr1631/hI68VYqWms9weLF0V7feAfwHlPB2ow8YYhpW99UKkKz7ELsEJkzG3nxhldkeO/QFxL+vqgdW3Ke215sOn7O9/rvrJtGpUO5c3dL9tmUh1INUIIm3YY28QI9WDYonQRPSsSpnyoWKK4FxjgF1T7W/KAgWuCwspmpBzvsHfY= 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: The first patch expose swapcache stat for memcg v1, the second patch remote unused do_memsw_account() in memcg1_stat_format(). v1->v2: Cover MEMCG_SWAP with CONFIG_SWAP and delete unused code suggested by Michal. Liu Shixin (2): memcg: expose swapcache stat for memcg v1 memcg: remove unused do_memsw_account in memcg1_stat_format Documentation/admin-guide/cgroup-v1/memory.rst | 1 + mm/memcontrol.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) Acked-by: Tejun heo