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: 63373 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4186371wrd; Thu, 2 Mar 2023 03:41:56 -0800 (PST) X-Google-Smtp-Source: AK7set9a4Vh7bJEKkkXJue29Fcd5O3bkSehpGZvco0IQfWrHSer73rP9MU0DeLizgfTiwdFnh/4J X-Received: by 2002:a17:906:d28a:b0:887:2248:efd5 with SMTP id ay10-20020a170906d28a00b008872248efd5mr8834104ejb.77.1677757315536; Thu, 02 Mar 2023 03:41:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677757315; cv=none; d=google.com; s=arc-20160816; b=grLR5Vt7LmlTIqiD64Ck/2FhjSKwE1E7mVGbbSkRjHG29RAwaQ35zLpXwjn4ubOk+V lsmKsaJtilIFOmiI1/I11c9Odg/9rfimwxEwljggQYUL+Jvv8UG7JGl8mnPKrKh46ya1 W8didZ4yHOwyWmCwFEb/N0jub5iLOq4CWWvKn2w2M8vczW/Dv4WJ1cKCSE/LpuXLIN22 05p0Yv2MUMXUyQ1C54SdwBRQnLfPwhXaJjZTC1r0Oxc8/ARXJfz/rKrjWX+WCUPg6sah /nYzTRRMShIpxpn1Np7duhraUvoh7vcukTqYdfLrnZs6oHV/R6yrtIp/pakGlXPIHFlZ /vOA== 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=uOkuypChHkNzLDRkvBZ73ca7PoMUKGQbSLHqhs0FKLY=; b=ALvWDjNTfxl1Z81y6HX5gwbOlZQKoIesk83U8bV7Ie+tBB3lg0JYGQI4/J/ARRYc2Y hiuw/kv+8vskEDxv5HIWlEt3PqStJT2CRq/wdcaLk4lZXhw8AI4FZ4oSRKMA5GdJKlJL DZ534by8t+nuemJ8gTQlVCmUiBpdpqdjiwE72R8H5bweh0pPeLgKARPu13h4oenHnjZv HTogaS2RS8uUtoJFuhf6bvFqiu7F/LpSgHOlU0FHCieWa57X5MkhUyf2cZ2lxL3sYMFO jfNjXTwVnfFHYyrbgkPDzTiq+bI/MHtdfN4EuLseI0U0YI5L/5zIq0c4uo7QiDK8X59f xIUQ== 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 j27-20020a1709062a1b00b008b17dad2e3bsi16185890eje.246.2023.03.02.03.41.29; Thu, 02 Mar 2023 03:41:55 -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 S229974AbjCBLja (ORCPT + 99 others); Thu, 2 Mar 2023 06:39:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbjCBLjW (ORCPT ); Thu, 2 Mar 2023 06:39:22 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B540333459 for ; Thu, 2 Mar 2023 03:39:00 -0800 (PST) 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-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?1759256054901036653?= X-GMAIL-MSGID: =?utf-8?q?1759256054901036653?= 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.