From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 4870B2DC787 for ; Wed, 19 Nov 2025 07:32:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763537566; cv=none; b=J++e+fPKprKTBXPrwEkaVP1P5w1Fk77nQR79QN4vvXoz0cGOH5P6JVh5ew8YG3sjydEWJuKRr/uQqC7i8RVcgf9sx2SexzW2QVg7XR99lGGtkP4RR34NufTZE5hgfKN2s2VgH0C5rDXswEaNA1TnNXYvv1aUze3fjKgVL6HST1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763537566; c=relaxed/simple; bh=+D4SI0id3ghRpsncA0V/j2DS0LnrpMNXscT0G9mAsqo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HLQv+Xol1iO+CEoQu2y264+J/V4eHjfYRnYCNIvEZPwi2aSEgEltuiwjCKS8WbXG5ATu30teZdUv6vC1qVwuOLDcDlWPNmBEwcCJ5yyO8b6BzsYblA0jMjSEo4igGjyojrOf1jhLWQu33h1WhFGN6itdziVjy/XKE021XGz73f8= 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=RkrZBK3O; arc=none smtp.client-ip=91.218.175.186 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="RkrZBK3O" 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=1763537550; 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; bh=RM/LNY/jIqKvMu4siWA3n4g7le9dIkYSozgItVRuYzQ=; b=RkrZBK3OBlnLn39KLbMXWTZHlkpQhan3nyk+UskGsUD7ugTEJOaYyfWLD3V1wFF7qXLd8d 89T9NsZlF9okuMBocxfIwiJRSi+XwXf2ys8YqEE8dcM+bWD2FAunmOg9NrueVwybIJH4fT KGL4YWEpARpMdZqp/4K6fUM4DDEnpoI= 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 Subject: [PATCH v2 0/7] enable PT_RECLAIM on all 64-bit architectures Date: Wed, 19 Nov 2025 15:31:17 +0800 Message-ID: Precedence: bulk X-Mailing-List: linux-parisc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Qi Zheng Changelog in v2: - fix compilation errors (reported by Magnus Lindholm and kernel test robot) - adjust some code style (suggested by Huacai Chen) - make PT_RECLAIM user-unselectable (suggested by David Hildenbrand) - rebase onto the next-20251119 Hi all, This series aims to enable PT_RECLAIM on all 64-bit architectures. 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, we need to enable PT_RECLAIM, which depends on MMU_GATHER_RCU_TABLE_FREE. Therefore, this series first enables MMU_GATHER_RCU_TABLE_FREE on all 64-bit architectures, and finally makes PT_RECLAIM depend on 64BIT. This way, PT_RECLAIM can be enabled by default on all 64-bit architectures. BTW, PT_RECLAIM works well on all 32-bit architectures as well. Although the benefit isn't significant, there's still memory that can be reclaimed. Perhaps PT_RECLAIM can be enabled on all 32-bit architectures in the future. Comments and suggestions are welcome! Thanks, Qi Qi Zheng (7): mm: change mm/pt_reclaim.c to use asm/tlb.h instead of asm-generic/tlb.h alpha: mm: enable MMU_GATHER_RCU_TABLE_FREE LoongArch: mm: enable MMU_GATHER_RCU_TABLE_FREE mips: mm: enable MMU_GATHER_RCU_TABLE_FREE parisc: mm: enable MMU_GATHER_RCU_TABLE_FREE um: mm: enable MMU_GATHER_RCU_TABLE_FREE mm: enable PT_RECLAIM on all 64-bit architectures arch/alpha/Kconfig | 1 + arch/alpha/include/asm/tlb.h | 6 +++--- arch/loongarch/Kconfig | 1 + arch/loongarch/include/asm/pgalloc.h | 7 +++---- arch/mips/Kconfig | 1 + arch/mips/include/asm/pgalloc.h | 7 +++---- arch/parisc/Kconfig | 1 + arch/parisc/include/asm/tlb.h | 4 ++-- arch/um/Kconfig | 1 + arch/x86/Kconfig | 1 - mm/Kconfig | 9 ++------- mm/pt_reclaim.c | 2 +- 12 files changed, 19 insertions(+), 22 deletions(-) -- 2.20.1