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: 63371 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4185790wrd; Thu, 2 Mar 2023 03:40:26 -0800 (PST) X-Google-Smtp-Source: AK7set8vHNYmjQVGq8up010f3b89Gbn3eRenprBQAuiTFn3yv0nVYNTSN+Z8nEbSVHf0ep/dwUqU X-Received: by 2002:a05:6402:10d5:b0:4ac:b6db:3ed0 with SMTP id p21-20020a05640210d500b004acb6db3ed0mr10070258edu.39.1677757225850; Thu, 02 Mar 2023 03:40:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677757225; cv=none; d=google.com; s=arc-20160816; b=bD3ecbu83x6eEj1awfAv7w14fGN3KtdP/IuSxf5iVxmNjGdr1PYc2GypUBqcni9Grk FZLCtuScCNFpE76CmByuhkwdUnHzv91cROjtScpoGTCuu0nV5nvFbCisxy7y3rVeo6U6 4eZqP667u6t+cLI+HVNJkXC661IOxYa50dXv4hOv/woaBbb0Znfw0A6WUrSXKAWtoIj4 uaihvDkteySIl4lvB/Ikeo4nY7HwAhiE8oajuEL+ctjrqXRH00QYDxRDW7y1oeG8mHTc d1yTLG/q1/c73U6NrJT0bJMNPYY62PPIPISeKkuAcGGszebpLnMtL3GhB6Xc77pJtXMR iJsw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=gwhng07azqRhfhOC4+3UGmwycg/hm8zwc4Xg/sEtDWs=; b=uMqnI+8+oR3qjx7TxH0wEiWaISFiSjxCNbwAOlIksokfX3P3zqrO3AdAHdfZ7CBrPS p+Tn2MD3agJ54G/pufYN9IW79jiE9gmliYqZ43p9aWS32BCA661gANoYdA2vFtBfEnOB 8dLQMsqQzPP3sdY3UgMz5jmUmtPkMn0OBD8WIbGc7Cm++gUSP4fnGZmM5Za+wVQBs9+R pCPpG2gPYqNngVQgm2PZt3CZCnZo0c1L3VydZZRP7iIVhwV4bIhq+VRIeIhV7dx4Hhiw 0uJ4vkXs9BbcU+F/0vMNBrHEGNe8hfrHT9EXWnyp8V2dB9cjX8tV5U6IPQKdxjmaY0Kq St8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m5-20020aa7c485000000b004ad7b12d236si6302895edq.318.2023.03.02.03.40.03; Thu, 02 Mar 2023 03:40:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229801AbjCBLjV (ORCPT + 99 others); Thu, 2 Mar 2023 06:39:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229719AbjCBLjQ (ORCPT ); Thu, 2 Mar 2023 06:39:16 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11CCF367D6 for ; Thu, 2 Mar 2023 03:38:47 -0800 (PST) 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759255960609865831?= X-GMAIL-MSGID: =?utf-8?q?1759255960609865831?= 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; }