From patchwork Thu Mar 2 11:58:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13157123 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 984AEC6FA8E for ; Thu, 2 Mar 2023 11:37:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A21046B0073; Thu, 2 Mar 2023 06:37:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 746086B0080; Thu, 2 Mar 2023 06:37:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5713A6B0078; Thu, 2 Mar 2023 06:37:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 3684C6B0073 for ; Thu, 2 Mar 2023 06:37:50 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 0A23EA0583 for ; Thu, 2 Mar 2023 11:37:50 +0000 (UTC) X-FDA: 80523758700.03.8BDE63E Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf17.hostedemail.com (Postfix) with ESMTP id DC30540018 for ; Thu, 2 Mar 2023 11:37:46 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1677757068; a=rsa-sha256; cv=none; b=2egUcMbGFZShyYxSs8pWZw02u40F6BQy35DOpmuocfEDAZxha4Q5Q4VnllpkWvyW8kEHXT S0Cid8SURJTBhrdZgAExK3Dv6bVmMJUfmlu36upyygS6IxH4lRciVtvIDWtJDogPloGICm P71aq3zWhxuUL8F1c6a0IAkqQv4Ss/s= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1677757068; 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:in-reply-to:references:references; bh=uOkuypChHkNzLDRkvBZ73ca7PoMUKGQbSLHqhs0FKLY=; b=4e6VwJfLzk6ly3p9xT2sKbp40n5GkL6dztSH6Z5Rx9JniYcgql2+b+7Vet/E+1NzEVF8bU RfXh9ZoL9L6K/05KzSDHZCt3vZnlcWTtLtIftnvDZ410mbHBaZ9UXag4lQO91P41GxpFpk OVuWRHdb8RTxQDJuRhcDzBICtYJzI2k= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4PS8Cn54NTznWGX; Thu, 2 Mar 2023 19:35:01 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 2 Mar 2023 19:37:42 +0800 From: Kefeng Wang To: CC: , , "Matthew Wilcox (Oracle)" , Kefeng Wang Subject: [PATCH v2 2/7] mm: memory: use folio_throttle_swaprate() in do_swap_page() Date: Thu, 2 Mar 2023 19:58:30 +0800 Message-ID: <20230302115835.105364-3-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230302115835.105364-1-wangkefeng.wang@huawei.com> References: <20230302115835.105364-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Queue-Id: DC30540018 X-Rspamd-Server: rspam01 X-Stat-Signature: zkiw8za68y9ufb4o8gjqtamwek13a6uy X-HE-Tag: 1677757066-602575 X-HE-Meta: U2FsdGVkX1+YArL8x9hSBtBoQOSu43Zw3BP56KSdEA0GksMmlxQWO52r+KB8Hz6jLg2jInRDdlB+tAPiyvNRJhHoqfSporueKMLZVAIS/0QfHiCN/ng/vMT+FU5w8L1s2GTg117DGhcAMuLbktYp7Wa2NjvQza5WMQ3mGGMCDDgXlNTtHxtNscojmVqADWBPzgOgHLwLS24NNcZusJ17wlvlh+qGCPXXbT7GqkySloZtzd92CzD0fXXmvnkYWC+pOlcRrmisYmPCbOuZOVZ/Y5J6Lf9ynyUM9/nAwXkDbKTrvc8SjRurr2W/o0VTglkYMXMbuQMlAOO835J4Lp5/43CYxev/OJ/PLKJFSXK/yaw0pUTsHTEamOw2V3Zzi6GEweIcrBinHfXYXUUcAOSa9ejF6ECGt39uMJFtc7nL87+xFmcPiQwg7Up92Q6B1rjGZqLvinY0HeKt5V/eBPkJwfGOVSvoPsaSJohRKJ7t16HYHGqxv9KkGpovddOaIKgv/WaVFDs/069OicdzbZqTO4XAHcB2eiB7n8W07h449OsmZWrdhVT1uRw4J3tPqX+SCTuOf2utOvqsxfZHTimBrF2jo0fPSBp2xDQV1Oc4REfeHpOZykSExwholBTF/7eP99zmZn6fWedXxcRbLUosgpuvjiJPLc1NOjFRgEF1L66BEY2ayVGts6rhf6IJEUGf4BCeug7sr4hTwE940WyiLNzvh/PGLdTHOkQ5PwndSIQ/CqCn6SOQwqA6npyp8p5kP3Mx1ad0QoWKnf/GbFVU5vP7ZpSDMikNDejvPgqtKqpr7sfti4GmoSr0Ro3S0IIxqFH58RIg7WMxkQqaNhsf6H/h/pBkjUgKSXTqnbg69ZB8JDwhC9cMmL0krk/5WbFcsfZIT19/ctC9P0/V+BW+69sVkBWrTau84fxXMfeopovuSnClUeuTpu0anjS/YDRNzb6EPy1q1xXoUYaOnrK /TbhcypB +CzP/QjJ/PiBTf5uYVlayP9DxLV/IYkt+tjUXSLTwBR07L6lkj+MlYl4MpE2Fy4VyJTGrj5Au83sYn0CLDBGesmV8rTydgepAvEystK/p8sxJbxomtE/ali1O4XIAIUo+r4VpNgNwr2iOmjt1Bj8bAc+VFWzL1FveBXbo8Ju3QgwBfqhs3Phja0FTeaDDz9gYLyh72ddr5wCYn60tqtnMbT6wcA== 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: Directly use folio_throttle_swaprate() instead of cgroup_throttle_swaprate(). Signed-off-by: Kefeng Wang --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index 255b2f4fdd4a..948fdcd4d8bf 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3848,7 +3848,7 @@ vm_fault_t do_swap_page(struct vm_fault *vmf) lru_add_drain(); } - cgroup_throttle_swaprate(page, GFP_KERNEL); + folio_throttle_swaprate(folio, GFP_KERNEL); /* * Back out if somebody else already faulted in this pte.