[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+=Fv5RhxvyxKr2t+pHd1tbGrK57P-+b3pGe1nVaK_OLiFt2wg@mail.gmail.com>
Date: Sun, 1 Feb 2026 23:01:30 +0100
From: Magnus Lindholm <linmag7@...il.com>
To: Qi Zheng <qi.zheng@...ux.dev>
Cc: david@...nel.org, andreas@...sler.com, richard.weiyang@...il.com,
will@...nel.org, peterz@...radead.org, aneesh.kumar@...nel.org,
npiggin@...il.com, dev.jain@....com, ioworker0@...il.com,
akpm@...ux-foundation.org, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org, linux-alpha@...r.kernel.org,
loongarch@...ts.linux.dev, linux-mips@...r.kernel.org,
linux-parisc@...r.kernel.org, linux-um@...ts.infradead.org,
sparclinux@...r.kernel.org, Qi Zheng <zhengqi.arch@...edance.com>,
Richard Henderson <richard.henderson@...aro.org>, Matt Turner <mattst88@...il.com>
Subject: Re: [PATCH v4 2/8] alpha: mm: enable MMU_GATHER_RCU_TABLE_FREE
On Tue, Jan 27, 2026 at 1:16 PM Qi Zheng <qi.zheng@...ux.dev> wrote:
>
> From: Qi Zheng <zhengqi.arch@...edance.com>
>
> 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.
>
> Signed-off-by: Qi Zheng <zhengqi.arch@...edance.com>
> Cc: Richard Henderson <richard.henderson@...aro.org>
> Cc: Matt Turner <mattst88@...il.com>
> ---
> arch/alpha/Kconfig | 1 +
> arch/alpha/include/asm/tlb.h | 6 +++---
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
> index 80367f2cf821c..6c7dbf0adad62 100644
> --- a/arch/alpha/Kconfig
> +++ b/arch/alpha/Kconfig
> @@ -38,6 +38,7 @@ config ALPHA
> select OLD_SIGSUSPEND
> select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67
> select MMU_GATHER_NO_RANGE
> + select MMU_GATHER_RCU_TABLE_FREE
> select SPARSEMEM_EXTREME if SPARSEMEM
> select ZONE_DMA
> help
> diff --git a/arch/alpha/include/asm/tlb.h b/arch/alpha/include/asm/tlb.h
> index 4f79e331af5ea..ad586b898fd6b 100644
> --- a/arch/alpha/include/asm/tlb.h
> +++ b/arch/alpha/include/asm/tlb.h
> @@ -4,7 +4,7 @@
>
> #include <asm-generic/tlb.h>
>
> -#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte)
> -#define __pmd_free_tlb(tlb, pmd, address) pmd_free((tlb)->mm, pmd)
> -
> +#define __pte_free_tlb(tlb, pte, address) tlb_remove_ptdesc((tlb), page_ptdesc(pte))
> +#define __pmd_free_tlb(tlb, pmd, address) tlb_remove_ptdesc((tlb), virt_to_ptdesc(pmd))
> +
> #endif
> --
> 2.20.1
>
Looks good from an Alpha perspective.
Acked-by: Magnus Lindholm <linmag7@...il.com>
Powered by blists - more mailing lists