From nobody Mon Feb 9 20:36:50 2026 Received: from out-170.mta1.migadu.com (out-170.mta1.migadu.com [95.215.58.170]) (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 41D9A312807 for ; Tue, 27 Jan 2026 12:16:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769516185; cv=none; b=IWuWdPzYvfIa8GKo4x+1ZVjtzTUflk7OzLTg270aTTi71Cr34kfnvSlDbPmruzcdVLQBk1omKeGOULkWffewVbBKdwOPemf8NL7as9t73f21ltIi5e8CmjRX53hg/3WkZL0aRe0L69kKAvYyhPLszT2Ktz+KbwaL3PKVTTAS1jY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769516185; c=relaxed/simple; bh=11+Gw4P/9LydQICXj98068sKmY8lDHK8bLvUtxVXDtk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=q3VYONfMtlT6kz/1qH5aGZgXbSzE/RP70q1sqqqJeK8kjXjZ0BXaSLddgUdaahgXE+Fy7ZpdAOhgb+L28TySLDZ68mLrHIGtCNPX4lgB25Vk79+viXW3UzfBMcwMv/EgubMSLNeOsm9/ycBdyquhjeqtz2RvYr73EiDwwUz7wWo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=eTvSU3ZC; arc=none smtp.client-ip=95.215.58.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="eTvSU3ZC" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1769516181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nqzAgJ4OlgcGBu7aVY4MnPgaTUGUmQkYyYjl0T7Jjfo=; b=eTvSU3ZCpnyKbhQnuvuO2jr6hynLePtUm7AFB1uPj+vAJuTy9oTT2MVhYeJqwJohWAIjgB dugNI+BBRhHolFR11/lct21SCQbz4v6oxO18CXjq56Rn7h5liJp+VIMbmFDxZ6gUEE54yO 8pDwFthpkMeWcWpvHLph/yKF79EaL1M= From: Qi Zheng To: david@kernel.org, andreas@gaisler.com, richard.weiyang@gmail.com, will@kernel.org, peterz@infradead.org, aneesh.kumar@kernel.org, npiggin@gmail.com, dev.jain@arm.com, ioworker0@gmail.com, linmag7@gmail.com, akpm@linux-foundation.org Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-alpha@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linux-um@lists.infradead.org, sparclinux@vger.kernel.org, Qi Zheng , Richard Henderson , Matt Turner Subject: [PATCH v4 2/8] alpha: mm: enable MMU_GATHER_RCU_TABLE_FREE Date: Tue, 27 Jan 2026 20:12:55 +0800 Message-ID: <3380f40a89b73c488202c85f9a8abf99fb08543b.1769515122.git.zhengqi.arch@bytedance.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Qi Zheng 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 Cc: Richard Henderson Cc: Matt Turner Acked-by: Magnus Lindholm --- 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 @@ =20 #include =20 -#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte) -#define __pmd_free_tlb(tlb, pmd, address) pmd_free((tlb)->mm, pmd) -=20 +#define __pte_free_tlb(tlb, pte, address) tlb_remove_ptdesc((tlb), page_pt= desc(pte)) +#define __pmd_free_tlb(tlb, pmd, address) tlb_remove_ptdesc((tlb), virt_to= _ptdesc(pmd)) + #endif --=20 2.20.1