mm/page_ext: remove pgdat_page_ext_init()
Subsystems (4)
v2 cover mm/page_ext: remove pgdat_page_ext_init()
Hello,
pgdat_page_ext_init() has no effect on FLATMEM. The pgdat is always the zero-initialized contig_page_data, because no architecture supports FLATMEM + NUMA.
That constraint is only implicit in the arch Kconfig files. So patch 1 makes it explicit in mm/Kconfig, and patch 2 removes pgdat_page_ext_init().
No functional change.
---
Changes from v1 [1]
- Add patch 1 to make FLATMEM depend on !NUMA
[1] https://lore.kernel.org/all/[email protected]/
---
Sang-Heon Jeon (2):
mm/Kconfig: make FLATMEM depend on !NUMA
mm/page_ext: remove pgdat_page_ext_init()
include/linux/page_ext.h | 5 ----- mm/Kconfig | 2 ++ mm/mm_init.c | 1 - mm/page_ext.c | 9 --------- 4 files changed, 2 insertions(+), 15 deletions(-)
Signature · 1 line
2.43.0
PATCH v2 1/2 mm/Kconfig: make FLATMEM depend on !NUMA
FLATMEM + NUMA is not supported by any architecture and fails to build. The constraint is only implicit in the arch Kconfig files.
So make it explicit in mm/Kconfig.
No functional change.
--- mm/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
mm/Kconfig +2 -0
@@ -390,6 +390,7 @@ choice config FLATMEM_MANUAL bool "Flat Memory" + depends on !NUMA depends on !ARCH_SPARSEMEM_ENABLE || ARCH_FLATMEM_ENABLE help This option is best suited for non-NUMA systems with
@@ -424,6 +425,7 @@ config SPARSEMEM config FLATMEM def_bool y + depends on !NUMA depends on !SPARSEMEM || FLATMEM_MANUAL #
Signature · 1 line
2.43.0
Re: [PATCH v2 1/2] mm/Kconfig: make FLATMEM depend on !NUMA
Quoted 5 lines · Sang-Heon Jeon
FLATMEM + NUMA is not supported by any architecture and fails to build. The constraint is only implicit in the arch
Kconfigfiles.So make it explicit in mm/Kconfig.
Quoted 7 lines
No functional change.
Suggested-by Zi Yan <[email protected]>Signed-off-by Sang-Heon Jeon <[email protected]>--- mm/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
Hopefully no new arch will try to support it.
Quoted 21 lines
mm/Kconfig +2
-0@@ -390,6 +390,7 @@ choice config FLATMEM_MANUAL bool "Flat Memory" + depends on !NUMA depends on !ARCH_SPARSEMEM_ENABLE || ARCH_FLATMEM_ENABLE help This option is best suited for non-NUMA systems with@@ -424,6 +425,7 @@ config SPARSEMEM config FLATMEM def_bool y + depends on !NUMA depends on !SPARSEMEM || FLATMEM_MANUAL #
Signature · 2 lines
Best Regards, Yan, Zi
Re: [PATCH v2 1/2] mm/Kconfig: make FLATMEM depend on !NUMA
In reply to Sang-Heon JeonQuoted 9 lines · Sang-Heon Jeon
FLATMEM + NUMA is not supported by any architecture and fails to build. The constraint is only implicit in the arch
Kconfigfiles.So make it explicit in mm/Kconfig.
No functional change.
Suggested-by Zi Yan <[email protected]>Signed-off-by Sang-Heon Jeon <[email protected]>
Quoted 3 lines
--- mm/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
Signature · 2 lines
Sincerely yours, Mike.
Re: [PATCH v2 1/2] mm/Kconfig: make FLATMEM depend on !NUMA
In reply to Sang-Heon JeonQuoted 10 lines · Sang-Heon Jeon
FLATMEM + NUMA is not supported by any architecture and fails to build. The constraint is only implicit in the arch
Kconfigfiles.So make it explicit in mm/Kconfig.
No functional change.
Suggested-by Zi Yan <[email protected]>Signed-off-by Sang-Heon Jeon <[email protected]>---
Is this survives the compile bots, perfect.
Signature · 3 lines
Cheers, David
PATCH v2 2/2 mm/page_ext: remove pgdat_page_ext_init()
In reply to Sang-Heon Jeonpgdat_page_ext_init() sets pgdat->node_page_ext to NULL only on FLATMEM. FLATMEM depends on !NUMA, so the pgdat is always the zero-initialized contig_page_data and the store has no effect.
So remove the call site, the unused function and its declaration.
No functional change.
--- include/linux/page_ext.h | 5 ----- mm/mm_init.c | 1 - mm/page_ext.c | 9 --------- 3 files changed, 15 deletions(-)
include/linux/page_ext.h +0 -5
@@ -55,7 +55,6 @@ struct page_ext {extern bool early_page_ext;extern unsigned long page_ext_size; -extern void pgdat_page_ext_init (struct pglist_data *pgdat);static inline bool early_page_ext_enabled (void ) {
@@ -202,10 +201,6 @@ static inline bool early_page_ext_enabled(void)return false; } -static inline void pgdat_page_ext_init (struct pglist_data *pgdat) -{ -} -static inline void page_ext_init (void ) { }
mm/mm_init.c +0 -1
@@ -1394,7 +1394,6 @@ static void __meminit pgdat_init_internals(struct pglist_data *pgdat)for (i =0 ; i <NR_VMSCAN_THROTTLE ; i++)init_waitqueue_head (&pgdat->reclaim_wait[i]); -pgdat_page_ext_init (pgdat);lruvec_init (&pgdat->__lruvec); }
mm/page_ext.c +0 -9
@@ -164,11 +164,6 @@ void __init page_ext_init_flatmem_late(void)invoke_init_callbacks (); } -void __meminit pgdat_page_ext_init (struct pglist_data *pgdat) -{ - pgdat->node_page_ext =NULL ; -} -static struct page_ext *lookup_page_ext (const struct page *page) {unsigned long pfn =page_to_pfn (page);
@@ -494,10 +489,6 @@ void __init page_ext_init(void) panic("Out of memory"); } -void __meminit pgdat_page_ext_init (struct pglist_data *pgdat) -{ -} -#endif /**
Signature · 1 line
2.43.0
Quoted 6 lines · Sang-Heon Jeon
pgdat_page_ext_init()setspgdat->node_page_extto NULL only on FLATMEM. FLATMEM depends on !NUMA, so the pgdat is always the zero-initializedcontig_page_dataand the store has no effect.So remove the call site, the unused function and its declaration.
Quoted 9 lines
No functional change.
Signed-off-by Sang-Heon Jeon <[email protected]>--- include/linux/page_ext.h | 5 ----- mm/mm_init.c | 1 - mm/page_ext.c | 9 --------- 3 files changed, 15 deletions(-)
LGTM.
Signature · 2 lines
Best Regards, Yan, Zi
Quoted 10 lines · Sang-Heon Jeon
pgdat_page_ext_init()setspgdat->node_page_extto NULL only on FLATMEM. FLATMEM depends on !NUMA, so the pgdat is always the zero-initializedcontig_page_dataand the store has no effect.So remove the call site, the unused function and its declaration.
No functional change.
Signed-off-by Sang-Heon Jeon <[email protected]>---
Signature · 3 lines
Cheers, David