From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56A68243387 for ; Wed, 17 Dec 2025 18:24:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765995892; cv=none; b=scgrV8UaLJmq+HsuGHdzDoRnxq/K7sAAo2VdnPcKu6V4nK2aetNim0tCaWOLU8n1kBTFYLRMXqNzHV3nbWy9pcyvIV+FbF7mQNGtxuXrm26BLTy9SHamPhkPEEHZJt2f8CWyGDpYphqrMAnsULSkKKG3Mq4d5dlc+wUmr9Mx8zs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765995892; c=relaxed/simple; bh=69d/CV9J6acM4WDE5vvfJVa2TDiXX7UnXF91Ida33fQ=; h=Date:To:From:Subject:Message-Id; b=gdFn0XuZ4Wr6gAO6U9eDo/I0lHjNlQbW3CITlDo2wbmVbjGIpmKRpPedU3/V+jU4MKriA1bucfIPxGQzWilFxI9z7N25CLUTK7qToDlOZI9dsOn7D8uSu5VBDfHz6GxdG+3fd0hD/RM0WAipha/+GKBX/M9+MRuNWVsi7MKnBys= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=IwpgDhU0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="IwpgDhU0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA1E7C4CEF5; Wed, 17 Dec 2025 18:24:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1765995891; bh=69d/CV9J6acM4WDE5vvfJVa2TDiXX7UnXF91Ida33fQ=; h=Date:To:From:Subject:From; b=IwpgDhU0VuZJxu2tWCkJgKnSTqC8qGcAW1Ne65MLOibM9EIlU2tob9wmNySLpEexM UsOm2VQWhJkABT5MT8gkhV0Ktr7EoKPGR4ogg0z79uBAelW3rLr6mHWSIqwlZIFd4d kCkvoGeyOYJJI6GDMTYWvCbxB6nLxspth1ch94s8= Date: Wed, 17 Dec 2025 10:24:51 -0800 To: mm-commits@vger.kernel.org,will@kernel.org,tsbogend@alpha.franken.de,richard@nod.at,richard.henderson@linaro.org,peterz@infradead.org,npiggin@gmail.com,mattst88@gmail.com,linmag7@gmail.com,kernel@xen0n.name,johannes@sipsolutions.net,James.Bottomley@HansenPartnership.com,ioworker0@gmail.com,dev.jain@arm.com,deller@gmx.de,david@kernel.org,chenhuacai@kernel.org,anton.ivanov@cambridgegreys.com,aneesh.kumar@kernel.org,zhengqi.arch@bytedance.com,akpm@linux-foundation.org From: Andrew Morton Subject: + mips-mm-enable-mmu_gather_rcu_table_free.patch added to mm-new branch Message-Id: <20251217182451.CA1E7C4CEF5@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: mips: mm: enable MMU_GATHER_RCU_TABLE_FREE has been added to the -mm mm-new branch. Its filename is mips-mm-enable-mmu_gather_rcu_table_free.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mips-mm-enable-mmu_gather_rcu_table_free.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. The mm-new branch of mm.git is not included in linux-next Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: Qi Zheng Subject: mips: mm: enable MMU_GATHER_RCU_TABLE_FREE Date: Wed, 17 Dec 2025 17:45:45 +0800 On a 64-bit system, madvise(MADV_DONTNEED) may cause a large number of empty PTE page table pages (such as 100GB+). To resolve this problem, first enable MMU_GATHER_RCU_TABLE_FREE to prepare for enabling the PT_RECLAIM feature, which resolves this problem. Link: https://lkml.kernel.org/r/1c14fe4de18e7bc71b98eb58dbd4edb13d3391cd.1765963770.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Cc: Thomas Bogendoerfer Cc: "Aneesh Kumar K.V" Cc: Anton Ivanov Cc: David Hildenbrand (Red Hat) Cc: Dev Jain Cc: Helge Deller Cc: Huacai Chen Cc: "James E.J. Bottomley" Cc: Johannes Berg Cc: Lance Yang Cc: Magnus Lindholm Cc: Matt Turner Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Richard Henderson Cc: Richard Weinberger Cc: WANG Xuerui Cc: Will Deacon Signed-off-by: Andrew Morton --- arch/mips/Kconfig | 1 + arch/mips/include/asm/pgalloc.h | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/arch/mips/include/asm/pgalloc.h~mips-mm-enable-mmu_gather_rcu_table_free +++ a/arch/mips/include/asm/pgalloc.h @@ -48,8 +48,7 @@ static inline void pud_populate(struct m extern void pgd_init(void *addr); extern pgd_t *pgd_alloc(struct mm_struct *mm); -#define __pte_free_tlb(tlb, pte, address) \ - tlb_remove_ptdesc((tlb), page_ptdesc(pte)) +#define __pte_free_tlb(tlb, pte, address) tlb_remove_ptdesc((tlb), page_ptdesc(pte)) #ifndef __PAGETABLE_PMD_FOLDED @@ -72,7 +71,7 @@ static inline pmd_t *pmd_alloc_one(struc return pmd; } -#define __pmd_free_tlb(tlb, x, addr) pmd_free((tlb)->mm, x) +#define __pmd_free_tlb(tlb, x, addr) tlb_remove_ptdesc((tlb), virt_to_ptdesc(x)) #endif @@ -97,7 +96,7 @@ static inline void p4d_populate(struct m set_p4d(p4d, __p4d((unsigned long)pud)); } -#define __pud_free_tlb(tlb, x, addr) pud_free((tlb)->mm, x) +#define __pud_free_tlb(tlb, x, addr) tlb_remove_ptdesc((tlb), virt_to_ptdesc(x)) #endif /* __PAGETABLE_PUD_FOLDED */ --- a/arch/mips/Kconfig~mips-mm-enable-mmu_gather_rcu_table_free +++ a/arch/mips/Kconfig @@ -99,6 +99,7 @@ config MIPS select IRQ_FORCED_THREADING select ISA if EISA select LOCK_MM_AND_FIND_VMA + select MMU_GATHER_RCU_TABLE_FREE select MODULES_USE_ELF_REL if MODULES select MODULES_USE_ELF_RELA if MODULES && 64BIT select PERF_USE_VMALLOC _ Patches currently in -mm which might be from zhengqi.arch@bytedance.com are mm-change-mm-pt_reclaimc-to-use-asm-tlbh-instead-of-asm-generic-tlbh.patch alpha-mm-enable-mmu_gather_rcu_table_free.patch loongarch-mm-enable-mmu_gather_rcu_table_free.patch mips-mm-enable-mmu_gather_rcu_table_free.patch parisc-mm-enable-mmu_gather_rcu_table_free.patch um-mm-enable-mmu_gather_rcu_table_free.patch mm-make-pt_reclaim-depends-on-mmu_gather_rcu_table_free.patch