Qi Zheng
d8b65654b1
mm: change mm/pt_reclaim.c to use asm/tlb.h instead of asm-generic/tlb.h
Patch series "enable PT_RECLAIM on more 64-bit architectures", v4.
This series aims to enable PT_RECLAIM on more 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.
For these architectures that define its own __tlb_remove_table(), since
their page tables are not of type struct ptdesc, they cannot be supported
PT_RECLAIM.
Therefore, this series first enables MMU_GATHER_RCU_TABLE_FREE on all
64-bit architectures, then converts __HAVE_ARCH_TLB_REMOVE_TABLE to
CONFIG_HAVE_ARCH_TLB_REMOVE_TABLE config, and finally makes PT_RECLAIM
depend on MMU_GATHER_RCU_TABLE_FREE && !HAVE_ARCH_TLB_REMOVE_TABLE. This
way, PT_RECLAIM can be enabled by default on most 64-bit architectures.
Of course, this will also be enabled on some 32-bit architectures that
already support MMU_GATHER_RCU_TABLE_FREE. That's fine, 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.
This patch (of 8):
Generally, the asm/tlb.h will include asm-generic/tlb.h, so change
mm/pt_reclaim.c to use asm/tlb.h instead of asm-generic/tlb.h. This is a
preparation for enabling CONFIG_PT_RECLAIM on other architectures, such as
alpha.
Link: https://lkml.kernel.org/r/cover.1769515122.git.zhengqi.arch@bytedance.com
Link: https://lkml.kernel.org/r/befca537d10c6bf8d531b1ee0a8af1e3b31352b0.1769515122.git.zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Acked-by: David Hildenbrand (Red Hat) <david@kernel.org>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lance Yang <ioworker0@gmail.com>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Magnus Lindholm <linmag7@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: Will Deacon <will@kernel.org>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: WANG Xuerui <kernel@xen0n.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-02-06 15:47:17 -08:00
..
2026-02-06 15:47:17 -08:00
2026-01-31 14:22:52 -08:00
2026-01-31 14:22:39 -08:00
2026-01-26 20:02:32 -08:00
2026-01-31 14:22:40 -08:00
2026-01-31 14:22:39 -08:00
2026-01-31 14:22:36 -08:00
2025-07-24 19:12:36 -07:00
2026-02-06 15:47:15 -08:00
2025-05-22 14:55:36 -07:00
2025-09-28 11:51:29 -07:00
2025-05-12 23:50:38 -07:00
2026-01-26 20:02:27 -08:00
2025-11-20 13:43:57 -08:00
2026-02-06 15:47:16 -08:00
2025-07-01 13:25:36 -06:00
2026-01-26 20:02:26 -08:00
2025-09-28 11:51:31 -07:00
2025-10-29 15:50:42 +01:00
2025-12-05 17:01:20 -08:00
2026-02-06 15:47:16 -08:00
2026-02-06 15:47:16 -08:00
2026-01-20 19:24:49 -08:00
2026-01-31 14:22:38 -08:00
2025-12-05 13:52:43 -08:00
2026-01-26 20:02:33 -08:00
2026-02-06 15:47:16 -08:00
2026-01-31 14:22:43 -08:00
2026-01-26 20:02:28 -08:00
2025-11-20 13:43:57 -08:00
2026-01-20 19:24:50 -08:00
2025-11-20 13:43:57 -08:00
2026-01-26 20:02:20 -08:00
2026-01-31 14:22:52 -08:00
2025-09-21 14:22:21 -07:00
2026-01-19 12:30:00 -08:00
2026-01-26 20:02:28 -08:00
2026-01-31 14:22:36 -08:00
2025-11-29 10:41:09 -08:00
2026-02-06 15:47:15 -08:00
2025-09-01 17:11:37 -07:00
2025-12-23 11:23:17 -08:00
2026-01-26 20:02:23 -08:00
2025-07-09 22:42:22 -07:00
2026-01-31 14:22:56 -08:00
2026-01-31 14:22:36 -08:00
2025-11-16 17:27:58 -08:00
2026-01-20 19:24:48 -08:00
2026-01-26 20:02:23 -08:00
2026-01-26 20:02:23 -08:00
2026-01-31 14:22:39 -08:00
2026-01-26 19:03:47 -08:00
2026-02-06 15:47:16 -08:00
2026-01-31 14:22:36 -08:00
2026-01-31 14:20:03 -08:00
2026-01-31 14:22:38 -08:00
2026-02-06 15:47:15 -08:00
2026-01-26 20:02:36 -08:00
2025-12-03 11:53:47 -08:00
2026-01-26 19:03:48 -08:00
2026-01-20 19:24:48 -08:00
2026-01-31 14:22:36 -08:00
2025-11-24 15:08:52 -08:00
2025-11-20 13:43:58 -08:00
2026-01-31 14:20:03 -08:00
2026-01-31 14:22:51 -08:00
2025-11-24 15:08:54 -08:00
2026-02-06 15:47:16 -08:00
2025-05-12 23:50:31 -07:00
2025-09-13 16:55:07 -07:00
2026-01-20 19:24:33 -08:00
2026-01-20 19:24:48 -08:00
2026-01-20 19:24:48 -08:00
2025-09-13 16:54:46 -07:00
2025-08-20 16:31:23 +03:00
2026-01-20 19:24:48 -08:00
2025-05-12 23:50:38 -07:00
2026-01-31 14:22:37 -08:00
2026-01-31 14:22:42 -08:00
2025-07-13 16:38:16 -07:00
2025-11-24 15:08:48 -08:00
2026-01-20 19:24:48 -08:00
2026-01-31 14:22:42 -08:00
2025-12-23 11:23:17 -08:00
2026-01-20 19:24:48 -08:00
2026-01-26 20:02:35 -08:00
2025-11-24 15:08:52 -08:00
2026-01-20 19:24:47 -08:00
2026-01-31 14:22:52 -08:00
2025-09-21 14:22:04 -07:00
2025-07-13 16:38:23 -07:00
2025-11-16 17:27:54 -08:00
2026-01-31 14:22:52 -08:00
2025-11-24 15:08:48 -08:00
2026-02-06 15:47:17 -08:00
2025-11-16 17:27:52 -08:00
2026-02-06 15:47:16 -08:00
2026-02-06 15:47:16 -08:00
2025-12-05 13:52:43 -08:00
2026-02-06 15:47:16 -08:00
2026-01-31 14:22:38 -08:00
2026-01-26 20:02:25 -08:00
2025-12-11 08:54:08 +09:00
2025-12-07 18:09:54 +01:00
2026-01-31 14:22:39 -08:00
2025-11-16 17:27:56 -08:00
2025-10-14 14:24:53 +02:00
2026-01-31 14:22:57 -08:00
2025-09-21 14:22:25 -07:00
2026-01-20 19:24:48 -08:00
2026-01-31 14:22:57 -08:00
2026-01-31 14:22:58 -08:00
2025-12-01 10:26:38 -08:00
2025-11-13 11:01:08 +01:00
2026-01-31 14:22:57 -08:00
2025-11-16 17:28:12 -08:00
2025-11-24 15:08:54 -08:00
2025-10-02 18:18:33 -07:00
2026-01-26 20:02:22 -08:00
2026-01-20 19:24:50 -08:00
2026-01-31 14:20:03 -08:00
2025-07-24 19:12:32 -07:00
2026-02-06 15:47:16 -08:00
2026-01-31 14:22:39 -08:00
2026-01-26 20:02:23 -08:00
2025-09-21 14:21:59 -07:00
2026-02-06 15:47:17 -08:00
2026-02-06 15:47:16 -08:00