From patchwork Thu Mar 2 11:58:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13157126 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 7FFC5C678D4 for ; Thu, 2 Mar 2023 11:37:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0C6656B0078; Thu, 2 Mar 2023 06:37:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CEE9C6B007D; 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 A79F06B0074; Thu, 2 Mar 2023 06:37:50 -0500 (EST) 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 6B7F16B0074 for ; Thu, 2 Mar 2023 06:37:50 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 3813C1A10DD for ; Thu, 2 Mar 2023 11:37:50 +0000 (UTC) X-FDA: 80523758700.05.C4FD421 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf15.hostedemail.com (Postfix) with ESMTP id CFFD0A0002 for ; Thu, 2 Mar 2023 11:37:46 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=none; spf=pass (imf15.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=zLLnEgXk3ombeSyuJin0uqAGRhvT2O6etA0OQW9vfssGFWiN2tVtqpZamjlt1ayTKJg9uU ksHrRjQ7Gibx2qzFlHEAZ5cHyMHBYjWPNayd9VSL/5+Mm8nwNXyuJD1QH8Gg6KxXT3tHvr RA4otV5JA3DjX9EfiCCa0JAEBZaeBOM= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; spf=pass (imf15.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=gwhng07azqRhfhOC4+3UGmwycg/hm8zwc4Xg/sEtDWs=; b=mZwOLiy+mQO2tjUaBEszNcuEaVqA9TEC29SLeOjSH2d91aT0yRBFoXnSULnMFBaaOZbkdm fOXkr7LIDXoSF8ve9D0kPityaEbAjkckQaJRSrkomCE0vzwY3gG33zo0d7SxqFPxzX3R7R APAxAguir6d86Y9F3pfYT6n32vQkvoo= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4PS8G65pX8zqVBq; Thu, 2 Mar 2023 19:37:02 +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 3/7] mm: memory: use folio_throttle_swaprate() in page_copy_prealloc() Date: Thu, 2 Mar 2023 19:58:31 +0800 Message-ID: <20230302115835.105364-4-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: CFFD0A0002 X-Rspamd-Server: rspam01 X-Stat-Signature: cpxbhwj5uequbiaggga6fnrp5wbsz94e X-HE-Tag: 1677757066-971882 X-HE-Meta: U2FsdGVkX18btHAJZ2y3PBcQjsctE31oDpeClDvgu8ujmdVgA/HwM+9R0EaUxVPnaY79bS+eHl4gqE+pkV3qhWpGUx3iyfNtKZ2OLrWzDQ84HFGkjlFnf5wbN/CqCBcOEHLoS5zSmPzVMCDIwi0uxqZcc5SPwKx5/mwEJ64Lf7PeJRXgVKgkoihMbAKbC0eSuPPbntkv/tRaXxihQfTHrPpbywOW+aYLB2uqC797MxVHWzx+ZA/kmayj8pkmaNV/SYXZn8IrUsH2TRbi1HljcUb8VSnw621DP0T4Czb5soBwLHhAvxoswHm286E1hXm+kzxWa1iekeZxR3FC5GWJ1a/aGHQvmCJ8TPlSWJ+YTBp0jQ0GXFzzUcWt8N2Fc/6cHs8B7AsakFDXDOOh7uNw01+Yr8O/OC1o0I7b+IIoRkERjU4r53f3Y71nnMwtQpJ743iF1cvHUA2oMChnzvEYaYR8mPMdOhqzgeNaLT7bFzm8NTX5FE8rtefur0glqWavdFVjHYfYAehMsOO7bTNs92+u/8AdnEXNbsPhfACmU7Ik2ZI0zZIkUGh1bI3IX98SQpFokDBAm6xLdHuExUhr0Rh74I96vWztg/I+qL//DZH8TWx9tz7BKxiyOEHDEB+YuXoROfCj+McC4Fdw4fboKVg5Kouy8DXpupVoQZxZCJVmSGGBX16CkjI+QxSQdNp2lhmtGy1cVJsWa5hnhDjP+moddJjvliAQD2NdSZr5w9N9kWkYgjtXT6vviT1+FuKs00DMb7VnzrM9lh6WYiwsDXeNd9lEElYjpv2KihGzSVtQUWtqL/Qt8xSIocQ4XfFoXOZU4C/aCAAxDjY6rYW503AfUwHXBARS65+xkfs71X+zCS6jFVv/WQuMOSZ3Jy529CnqbHCQH2v/a7eF2icAGBgFZTxPPxOehH5YHmT4u3gyvEhT0D/GHBgXtZI8FmrTf+hEB57ZebSbsiaRJ/J /S9R0PeH EfuTpChzetthrK+QepkDHLfyL9pF29VmYTvpcTmCaXc2hNTJbTHBcxVQMN7KDOKETl0EZLUs1vDbc37UGLv0vc6DyPCMJFehIoXJ73Dv16yvy7m+RJhiUU22bwv+ykPw9JwXg3unQlj/syGoAE5lF1D/qbqtpoQYijobTPwqNJNWXFRF7w5fQ6woKFzRyf/hmuAKBXzhX0DeRcp6ZeWCNjBoG3g== 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 948fdcd4d8bf..b5c87682bb17 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -974,7 +974,7 @@ static inline struct folio *page_copy_prealloc(struct mm_struct *src_mm, folio_put(new_folio); return NULL; } - cgroup_throttle_swaprate(&new_folio->page, GFP_KERNEL); + folio_throttle_swaprate(new_folio, GFP_KERNEL); return new_folio; }