From patchwork Thu Mar 2 11:58:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13157127 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 A07BDC7EE33 for ; Thu, 2 Mar 2023 11:37:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 60F136B007B; Thu, 2 Mar 2023 06:37:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 572996B007D; Thu, 2 Mar 2023 06:37:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4123D6B0081; Thu, 2 Mar 2023 06:37:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3305D6B007B for ; Thu, 2 Mar 2023 06:37:51 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id ECDE01A1064 for ; Thu, 2 Mar 2023 11:37:50 +0000 (UTC) X-FDA: 80523758700.26.8A56324 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf25.hostedemail.com (Postfix) with ESMTP id 84481A000E for ; Thu, 2 Mar 2023 11:37:48 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf25.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1677757069; 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=C9B8tPfbJgxpy1FGc2CFBjsvTKU83yOYpL9R3XfEe7M=; b=a3pDsVzYAEHeNajcPniqfvQHxg52DhM75rc4ewxyt8fJF+4xbyUHGw4IVtzQaenZ7lxm4k NAsqNBIOUwJ136aOYbi2IQbtmgMxtXav8jO1AHbGbXo7GlOQK9QXq0ZlgNHYhMaSKaPmQY 2Kcb42sp76AIvah4UZkDF6RgcNJKt/s= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf25.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1677757069; a=rsa-sha256; cv=none; b=K9qmQmiGu4uUokOMkcTEjCxdUi8jkMClifpgk9K5+QwYsrcASpED4UJBvWbnzrj3IjZX+Q NwCI8lkgpIKVKdAlwRj4xFQhn8zP7Z/r9K5Hjoqrh4GVEY/vWjirZWReW3DP0JS+KmriYA 9C7il1/MH9bq+D7KF1T1qfRkAA7leEo= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4PS8G7442ZzqVFL; Thu, 2 Mar 2023 19:37:03 +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:43 +0800 From: Kefeng Wang To: CC: , , "Matthew Wilcox (Oracle)" , Kefeng Wang Subject: [PATCH v2 5/7] mm: memory: use folio_throttle_swaprate() in do_anonymous_page() Date: Thu, 2 Mar 2023 19:58:33 +0800 Message-ID: <20230302115835.105364-6-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-Server: rspam04 X-Rspamd-Queue-Id: 84481A000E X-Stat-Signature: cxneopxnxbzdwxsm66c915k3zhrppzt5 X-HE-Tag: 1677757068-350873 X-HE-Meta: U2FsdGVkX1/3aXKIOQh7jnK1gX3r3zwjjtSB5Sch6ovASOsUHFHCREVfKLuuKcRebBOugptgmsES1rQ6dgW+yydRsExq03FjtQZi0g+LZ4dbU7gqtL9+YSNTvLJECffQU54cTzOOlU+bkigWQH8os+eEM6L6MWydYSnzpADKEYJXLrZyZZD6YdjNZ0oWeoO8ib8Dhl6dwD8bbiHXIS31m6c+XRgoHkf+boyIg1FPtBpJKEir+Mj0fx/+/y71kVBB2Cbas0gNRfiUCklhBNCzGi1DmSvjxIo/6pyJM3fbr003QdCLTLXkahSRupnidoe+ovKEawrAgFYpMB5j1nyNUcEZXGjoP/nwEwq3caRAEiu1Dtj7XDTIbq4KrT+YXIN8zECr2d4HHqYuoMfogJjTm0gKopdD8NQsrq/LPmMkMw5vxvwzVjxvVmLV/ogb2nzb4KHZkfHnsoaiQO9yTyzHjojYbS6zUSpNgBhwS49XTpSqCdxxp4hss9XcXX/6ZuTxE06eshxfYNzDbPo0D4AkrXmd/RXslen1UB/VRu08N1AwJT0YN/lXsjovDDJ3DEyfyD76zB4pqvqMDtcZiNWRRuM21fTQoVWXFl4QsbkjJXz8SnorFLkKi/BMEmPHmp8vqp8uREKnqJxo7Fl7KOxFX/oToyDkqG9w1C68WS7gcQBXBDE6egpz2SguCBLDm0yipEsZpaILUTfR6NGhEValhD5tzAxUSpuEkPCrXosoqNTKSDoKSkCRGdaxAa/x4E9lc3Zn6ZNHLDPOi7kt/8AWynod8rzPzOYHYXBG5LT3louOwp2+yFRWsukUrOzmP9AAasbNITK+1eugcURLnlGsIFdtObQRABgMxPr3vncTQ5uVLmY9tGTFr2/tZs4Idx2tbQBVLBxjNTL8JWuUSOc4Y6uctWi1JiJO6tYbGU2mS80uWGFkrUMsNiQIqer3yc9L1ooOOLoJPRgIKAxtqvu NiHnFoGZ c0L2+qha1j89GaMuTVRK/6Y9RttmR8UHlhl20x5+icTlOKewM8N8Lh7Zy80wi1SKb6ECdfRN2Mcj5afj94RyA5bC69ijdHWsYaLQ5hlxlWju+P8GPkY8Uk9XKv+1zqW0oeq0GNplYW76ahVciGwRW04lTGWMXHIq7eaeWWBTNdw+bY/NIUNZ4V3UnoWZkxgd3KNZTA+BaXkm+bhZa3dK6MUbIBA== 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 e068635d21cf..841737d5690d 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4065,7 +4065,7 @@ static vm_fault_t do_anonymous_page(struct vm_fault *vmf) if (mem_cgroup_charge(folio, vma->vm_mm, GFP_KERNEL)) goto oom_free_page; - cgroup_throttle_swaprate(&folio->page, GFP_KERNEL); + folio_throttle_swaprate(folio, GFP_KERNEL); /* * The memory barrier inside __folio_mark_uptodate makes sure that