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: 14039 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp934483vqi; Fri, 15 Sep 2023 03:13:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKG63VWXslML1FoVeET4tfvBzyzIMydnAS81q3J05i7drK2JseDUFZ0Fy6IxYdU9+FmHEA X-Received: by 2002:a05:6a00:2d8d:b0:68b:f529:a329 with SMTP id fb13-20020a056a002d8d00b0068bf529a329mr1273528pfb.5.1694772795453; Fri, 15 Sep 2023 03:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694772795; cv=none; d=google.com; s=arc-20160816; b=MJlxhg1xHymNq2kYny+dNGzXLTw2cNxptqyBy4lNImSmFI61++SSAmBm74kKFwFKu+ SkRMLVB+h79Y/zUBDR7/Gpae0t5xBdNLKvAFjZmrhC/LEjFWxEfvYHm+jrtIG0heoVGW UpCQE8hf3pFuVsgdTKZMuwRfWt9GPevGPRtrv/rY+BlkJQ25Co3SdqA0kc4rlaaaE/SJ cMra72NW60Pfjb/Udr8yctG84THzhB8JGejmeF30KhTxkulJ+wjkLihpiAO2GylLuDWS 5IJIrw/Lv/XTT5DLZdv8yzC9yj+s1mCJnhqXcCATcWMZPZj/7RArr8Dn3/MpC+hZpzZ1 aYAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=5RFyJJ5/liGoaN6Ic2klPw7Hqun52/OtqYu+AIB/oGA=; fh=RQkjQsTB9MN2y2EM859QwzLXjpdZ6BmsHN1X9z9wMYM=; b=AbJuByjYdP3Bmtc64fPymkbDwJFfXmiiuatr9qXYidLdoBSCEfcJR1W0dUgP5a9H9+ TbFut6CQ3NoZt+7E9pGXdrGYiqsjaYAAJIl4wSxyYlTP7R7qLSR8yxlGN09PM0gA6PMA ShgwusJ/25XGE3iuLI5xqmnobCeoAdQFQAHoQU4TyxwykOM4PKyGmQVGzY0K8jhwafin QO547MRWfqZnqEYvivGt9C6bZ8FOt+kLW9BkJ6LIWQt/McnU5vCcWJI4ojjnB+c+In/Y 0zfGZjZRWVXURHP7xRXASUQi1XWniW2lV6+YQKh1ccQTdVjRUclzDEHVz7qrFypMhMgF X2gQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id ay5-20020a056a00300500b0068e3a3cdfecsi3040430pfb.224.2023.09.15.03.13.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 03:13:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id DABF180F9BDA; Fri, 15 Sep 2023 03:07:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234214AbjIOKGz (ORCPT + 32 others); Fri, 15 Sep 2023 06:06:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234081AbjIOKGu (ORCPT ); Fri, 15 Sep 2023 06:06:50 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 732743C1B for ; Fri, 15 Sep 2023 03:05:29 -0700 (PDT) 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-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 15 Sep 2023 03:07:00 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777098078843907401 X-GMAIL-MSGID: 1777098078843907401 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