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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1012C678D4 for ; Thu, 2 Mar 2023 11:39:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229818AbjCBLjY (ORCPT ); Thu, 2 Mar 2023 06:39:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbjCBLjR (ORCPT ); Thu, 2 Mar 2023 06:39:17 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 405FB34307 for ; Thu, 2 Mar 2023 03:38:49 -0800 (PST) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PS8CV0bpyzSkQp; Thu, 2 Mar 2023 19:34: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.2507.21; Thu, 2 Mar 2023 19:37:41 +0800 From: Kefeng Wang To: CC: , , "Matthew Wilcox (Oracle)" , Kefeng Wang Subject: [PATCH v2 0/7] mm: remove cgroup_throttle_swaprate() completely Date: Thu, 2 Mar 2023 19:58:28 +0800 Message-ID: <20230302115835.105364-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert all the caller functions of cgroup_throttle_swaprate() to use folios, and use folio_throttle_swaprate(), which allows us to remove cgroup_throttle_swaprate() completely. v2: - address comments from Matthew Wilcox, eg, 1) folio conversion inside __do_huge_pmd_anonymous_page() function, 2) rename __cgroup_throttle_swaprate() to __folio_throttle_swaprate() 3) rename gfp_mask to gfp Kefeng Wang (7): mm: huge_memory: convert __do_huge_pmd_anonymous_page() to use a folio mm: memory: use folio_throttle_swaprate() in do_swap_page() mm: memory: use folio_throttle_swaprate() in page_copy_prealloc() mm: memory: use folio_throttle_swaprate() in wp_page_copy() mm: memory: use folio_throttle_swaprate() in do_anonymous_page() mm: memory: use folio_throttle_swaprate() in do_cow_fault() mm: swap: remove unneeded cgroup_throttle_swaprate() include/linux/swap.h | 12 ++++-------- mm/huge_memory.c | 21 +++++++++++---------- mm/memory.c | 10 +++++----- mm/swapfile.c | 6 +++--- 4 files changed, 23 insertions(+), 26 deletions(-) -- 2.35.3