Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp896289rdf; Fri, 3 Nov 2023 20:56:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwKHV+upj+CC80/WWG0h/3v3UqtdVWRGkdnKVQBjwcn/Ny8bKChGBtZFlGVoqPgbW/YIKe X-Received: by 2002:a17:902:cac4:b0:1bb:598a:14e5 with SMTP id y4-20020a170902cac400b001bb598a14e5mr20008924pld.43.1699070173014; Fri, 03 Nov 2023 20:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699070173; cv=none; d=google.com; s=arc-20160816; b=DOzz2Qg1jAYSDybCGe3xfTLOjIhoqRIj5ZNnfkfx/keysSwhTkWaCuA2T4XmB8trjc hZ1mk7RXxMfCabsSx5fxrUvwgmc19rWmOrfzx180rEgPQhv79kxNIm6+iDZ3xgTGPKlY C6w/GcPLdBzYlQMfE1hKRg0EcIMsAhFDOW+Lkk79yd9szEcEwdcaKHin530H1j5dcJE+ EunJBm1g2QU7PdNPF3cgBL18aIXOjfTB/CfIETkb/MFctVIy8w0Vc1cP3D2jtZw/ZGpe oTT3ajlpTV4odi6xFpDp3ajfdNZeJG8NImcOSfowgjFoIJCf2TCmlmv1Jg47bC3aU8fS 4pfA== 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 :message-id:date:subject:cc:to:from; bh=rr9s3lwcK47y7hDLfjGBnZ4gwlc32lagg4W+ihXgtFU=; fh=kUj/5waaepfljbNx30rj2BALdV0u/mUCTaFWThlgquQ=; b=nzvHydr9fMVhf2x8ob5iFyLVK+OCssuMGe9etWwhlnjkgQh8cN7v5cGZ4+eJ4nWZFu 8bKaXN60SSZZm5KCg9VN4qJVYFAYgcudlWWZ2Sh3BuONVLDN5l6qMKUF59VP+Rdh/x0J SqjlXZdQYXi04Jgdbw4rZwUDuxJYeV52GyYctajHo/lPL5+I21G9hqLbVR9c6Xe6bSLJ FcItQ/T2UFBbf8G3gPGesiyOHIJlN0XPl73DMifsnND60ME+UdNxoph5w3Q1Y2B8PqeS rjwn8pupWqYj+KJIX9VLxkCbTQm6KE7Jgn5SFkWaH/98Uxg7o8NS3LHxNhm44a7l7zbL OupQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id g18-20020a170902e39200b001cc5505fffdsi2619238ple.644.2023.11.03.20.56.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 20:56:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A79D481EB9E1; Fri, 3 Nov 2023 20:56:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346053AbjKDDzw (ORCPT + 99 others); Fri, 3 Nov 2023 23:55:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232749AbjKDDzr (ORCPT ); Fri, 3 Nov 2023 23:55:47 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67E8BD47; Fri, 3 Nov 2023 20:55:44 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SMkKf5Cg6zVl5J; Sat, 4 Nov 2023 11:55:34 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Sat, 4 Nov 2023 11:55:40 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , , Kefeng Wang Subject: [PATCH rfc v2 00/10] mm: convert mm counter to take a folio Date: Sat, 4 Nov 2023 11:55:12 +0800 Message-ID: <20231104035522.2418660-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 03 Nov 2023 20:56:09 -0700 (PDT) Make all mm_counter() and mm_counter_file() callers to use a folio, then convert mm counter functions to take a folio, which saves lots of compound_head() calls. Kefeng Wang (10): mm: swap: introduce pfn_swap_entry_to_folio() s390: pgtable: use a folio in ptep_zap_swap_entry() mm: huge_memory: use a folio in __split_huge_pmd_locked() mm: huge_memory: use a folio in zap_huge_pmd() mm: memory: use a folio in copy_nonpresent_pte() mm: memory: use a folio in zap_pte_range() mm: memory: use a folio in do_set_pmd() mm: memory: use a folio in insert_page_into_pte_locked() mm: convert mm_counter() to take a folio mm: convert mm_counter_file() to take a folio arch/s390/mm/pgtable.c | 4 +- include/linux/mm.h | 12 +++--- include/linux/swapops.h | 13 +++++++ kernel/events/uprobes.c | 2 +- mm/huge_memory.c | 34 +++++++++-------- mm/khugepaged.c | 4 +- mm/memory.c | 81 +++++++++++++++++++++++------------------ mm/rmap.c | 10 ++--- mm/userfaultfd.c | 2 +- 9 files changed, 94 insertions(+), 68 deletions(-) -- 2.27.0