From patchwork Thu Jan 12 08:30:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 42301 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3761469wrt; Thu, 12 Jan 2023 00:24:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXvrDAfLtBJsDk7US5jJsz/XohCp4uGwsMqPHpfrqFGuTFU2DUadbCEEEMarxmSCaHBdQS6d X-Received: by 2002:a17:906:494b:b0:862:e612:effe with SMTP id f11-20020a170906494b00b00862e612effemr3291959ejt.14.1673511853630; Thu, 12 Jan 2023 00:24:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673511853; cv=none; d=google.com; s=arc-20160816; b=ihkXdt9zCVY7+YE8p9CCEz52lFLvKzVux1pDfXuYKLrg0BRca1H4BMJdLWE07Y76JG Oc0aFrwZqXSTRpE9UAj1PSDhPNlSifoxb8/H4AmWEAh3hWEYzUwWTxmz7u6BndYQO5HG Q4dz+59yPK/WTf5BLFSt45hMamIcpekJ3gqO3YdXwREphY/gziqLqaNXZk57RVPJfxwH TsueX8i5VJZ0ueAVqAnBbMs5KJ42U3JLJ2So7njBDCNmpNqSxi6M8rB+BbGs5MGYdCSd +YM7M+pmR/PJ6Jq0UwNyy8hLg+mnbolPEyHjyrwuRyNV2m1S8Fv2UXdkLdp+cQMSAUF1 fV4A== 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=Al8EKcnYAtYB1JWIzS1KLhE26inWUEAs3Hs0krdsZ4w=; b=IjZQ38NhvM64JdXR1RHofbwMZQYr/q+E/sU7x+xP+OzS1EDHtafP+50WWUBx2wqlKp V06QJwBEsVQ2zo+eDUDrjFtcM+jMZjuZRo5/zqcfDQ4WJjEz428XXNALb8vXRXUQVu6u Yq0UAEkon1jY+iQdQzLd8ZEzOt7y4xeMpmNo6M+Ni6UyNULgiiGTyLuTx1cLtPbZyR+F 4Jvcs5vnMrYbh4XllkZULlol0VDqbJXloEQbQUta0mGcYO/xQM4S+dODXT1j3lzWMitY nMQIEYbbNiWWUblXMj1EnnUO7+aiC3kDH7sT/CkKh4csoGXEce9F7ldDmRIap0BpECqZ OcpQ== 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 di15-20020a170906730f00b0078d805901b1si19337024ejc.489.2023.01.12.00.23.50; Thu, 12 Jan 2023 00:24:13 -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 S239747AbjALISQ (ORCPT + 99 others); Thu, 12 Jan 2023 03:18:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239635AbjALIRx (ORCPT ); Thu, 12 Jan 2023 03:17:53 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FC873724D for ; Thu, 12 Jan 2023 00:17:36 -0800 (PST) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Nsy324H2pzqV7h; Thu, 12 Jan 2023 16:12:46 +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.2375.34; Thu, 12 Jan 2023 16:17:33 +0800 From: Kefeng Wang To: , , CC: , Kefeng Wang Subject: [PATCH -next 6/7] mm: memory: use folio_throttle_swaprate() in do_swap_page() Date: Thu, 12 Jan 2023 16:30:05 +0800 Message-ID: <20230112083006.163393-7-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230112083006.163393-1-wangkefeng.wang@huawei.com> References: <20230112083006.163393-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) 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?1754804365863494814?= X-GMAIL-MSGID: =?utf-8?q?1754804365863494814?= Directly use folio_throttle_swaprate() instead 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 746f485366e8..abc4e606d8bc 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3839,7 +3839,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.