From nobody Sat Feb 7 05:57:16 2026 Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (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 7606233D6CB for ; Wed, 17 Dec 2025 09:47:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765964828; cv=none; b=sQjfl8pL0PmR6dGTQnvA7OXaoqSiqJt5q1dAbpevYipyTIY4HlkaWMSdUomlkshBqIPr0x2cvANcnoZYgIAP1ibJLYGhWu/8UE54/sGyqUmibYprpYYLtEJCeAWGugnwxKaYGxS1VOzensKM1nrzdTlUiyOZ3dusK8rj/zj/kDk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765964828; c=relaxed/simple; bh=11+Gw4P/9LydQICXj98068sKmY8lDHK8bLvUtxVXDtk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qPYk13UwdiVks8SbgVzq3ymIitTZRNRRcuVhdqnqeJqI+gfGzAJ+kp7AQU1LBXrOAM3V4eD1uNQJPFH92GijPN3PM9vpnzr/06/VmuAoFQYqFO8Srt1fgOgVmObiltWrKkAQlgKkX70UGX0iw+J9chunkvysXg2wOr9ZIGtex9g= 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=jh2KGANA; arc=none smtp.client-ip=95.215.58.189 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="jh2KGANA" 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=1765964822; 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=jh2KGANAcZFZ/Soyhd/A84RQMbBaBHVyKCxUF5JCM+7cx9Rnhf/tMQ9P6HVN/+QKFGILZp BLjt6g/DwkO9AsGY0t54potwgCcFvvmS0tsSHhK+hfb0CuuOfNRuGIBOXhCfCHIj04JF9d IqY0V30iUlnAoa7IdoieTfgaHfQtGcM= From: Qi Zheng To: will@kernel.org, aneesh.kumar@kernel.org, npiggin@gmail.com, peterz@infradead.org, dev.jain@arm.com, akpm@linux-foundation.org, david@kernel.org, ioworker0@gmail.com, linmag7@gmail.com 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, Qi Zheng , Richard Henderson , Matt Turner Subject: [PATCH v3 2/7] alpha: mm: enable MMU_GATHER_RCU_TABLE_FREE Date: Wed, 17 Dec 2025 17:45:43 +0800 Message-ID: <3018b189364a57a76fc70dcb477aa5f0da045b05.1765963770.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 --- 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