Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp503338rdf; Fri, 3 Nov 2023 07:04:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFve3LuE0Xsfc6q2p0GhDpxCtsE05DBt/fNIXG91jljW19RgpCH7aRPilKNfgCm/0+mm1+3 X-Received: by 2002:a17:902:f34d:b0:1ca:e4b:148d with SMTP id q13-20020a170902f34d00b001ca0e4b148dmr15106440ple.65.1699020280898; Fri, 03 Nov 2023 07:04:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699020280; cv=none; d=google.com; s=arc-20160816; b=Yd6EIPNQPiH2dWd95ACKhNPSf+JFE/x0JIm9HYUgzH+b7dltRvl7gE5vnrZJEFpGZM hnmZ46urCNKAjHcqlr/GKFptIROWg7hAxtL6dVgbfcryiy6u6TXINnIpRuiC1O0IrGhA wnLXdyUblfw58rMdmMk2YPzNtUAyFXic6J4AFO3HGihAKBy5WrL9mAMZzTj4n8HFG9bZ 9bSxDZXVmXt3U2Bwzlz+ahq3G6uDw4JTyu6N+ITxIGS56VnO/Hidq7z3c/Sk/Muq6+1e lmkGAUnQc08+mAE0iBIbCHC9WhAQDhhMtplxn42YjO8CE+dwGLvs44LlheP6JGCkWC/S EEmg== 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=Tsyq15HMBORwL4FbDOu31lu8fOYHpX51tJA+WV10eik=; fh=kUj/5waaepfljbNx30rj2BALdV0u/mUCTaFWThlgquQ=; b=odUIbZWaBhsS7MpjRm70b5b+idWRNXPH0qz5jlfs1WQID4qhnGxXwIfaM8Ca+eQmSc q5iB3BS+dSTg8Lv2JtbHe4eCfpM04FQxkt/DdPdZl9wNkxF9DIhgngDFPthkPVxUTeiH sn3ImUx8z94qjF679e0szJ8Aa5ziZ99iT8BSQPLmnkibL8K7D1Yg8QPbZdGOctY3Akx8 2mTPAlHDLvaL3Gk3CGJ+z5oTbcMhPe8ZeHE8K48DVDwKBOaM5Pvo1j9zqXM0xzm0/EYE 6zaaZIpJJB7/PySqVhLv8Xx0Z+Hli7eTQ0mm+Oewu2ygOta7AIjwr9bt6jc40r6C6lmm uevw== 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 kf11-20020a17090305cb00b001c9d9050b37si1528000plb.260.2023.11.03.07.04.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 07:04:40 -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 D64BF81F4738; Fri, 3 Nov 2023 07:04:23 -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 S1377765AbjKCODu (ORCPT + 99 others); Fri, 3 Nov 2023 10:03:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233674AbjKCODs (ORCPT ); Fri, 3 Nov 2023 10:03:48 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34209D4D; Fri, 3 Nov 2023 07:03:45 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SMMpG1TbrzrSJv; Fri, 3 Nov 2023 22:00:38 +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; Fri, 3 Nov 2023 22:03:42 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , , Kefeng Wang Subject: [PATCH rfc 00/18] mm: convert to use folio mm counter Date: Fri, 3 Nov 2023 22:01:01 +0800 Message-ID: <20231103140119.2306578-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: dggems706-chm.china.huawei.com (10.3.19.183) 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 07:04:24 -0700 (PDT) Convert mm counter page functions to folio ones. mm_counter() -> mm_counter_folio() mm_counter_file() -> mm_counter_file_folio() Maybe it's better to rename folio mm counter function back to mm_counter() and mm_counter_file() after all conversion? Kefeng Wang (18): mm: add mm_counter_folio() and mm_counter_file_folio() uprobes: use mm_counter_file_folio() mm: userfaultfd: use mm_counter_folio() mm: rmap: use mm_counter_[file]_folio() mm: swap: introduce pfn_swap_entry_to_folio() mm: huge_memory: use a folio in __split_huge_pmd_locked() mm: huge_memory: use a folio in zap_huge_pmd() mm: khugepaged: use mm_counter_file_folio() in collapse_pte_mapped_thp() mm: memory: use a folio in do_set_pmd() mm: memory: use mm_counter_file_folio() in copy_present_pte() mm: memory: use mm_counter_file_folio() in wp_page_copy() mm: memory: use mm_counter_file_folio() in set_pte_range() mm: memory: use a folio in insert_page_into_pte_locked() mm: remove mm_counter_file() mm: memory: use a folio in copy_nonpresent_pte() mm: use a folio in zap_pte_range() s390: pgtable: use mm_counter_folio() in ptep_zap_swap_entry() mm: remove mm_counter() 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 | 25 +++++++------ mm/khugepaged.c | 4 +-- mm/memory.c | 77 +++++++++++++++++++++++------------------ mm/rmap.c | 10 +++--- mm/userfaultfd.c | 4 +-- 9 files changed, 88 insertions(+), 63 deletions(-) -- 2.27.0