Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Zi Yan" <ziy@nvidia.com>
To: "Sang-Heon Jeon" <ekffu200098@gmail.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"David Hildenbrand" <david@kernel.org>,
	"Mike Rapoport" <rppt@kernel.org>,
	"Vlastimil Babka" <vbabka@kernel.org>
Cc: "Brendan Jackman" <brendan.jackman@linux.dev>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Liam R. Howlett" <liam@infradead.org>, <linux-mm@kvack.org>,
	"Lorenzo Stoakes" <ljs@kernel.org>,
	"Michal Hocko" <mhocko@suse.com>,
	"Suren Baghdasaryan" <surenb@google.com>
Subject: Re: [PATCH] mm/page_ext: remove pgdat_page_ext_init()
Date: Mon, 03 Aug 2026 21:35:17 -0400	[thread overview]
Message-ID: <DKFRUZVRDMIZ.Q5GDFVAD25Q5@nvidia.com> (raw)
In-Reply-To: <20260803134822.2568766-1-ekffu200098@gmail.com>

On Mon Aug 3, 2026 at 9:48 AM EDT, Sang-Heon Jeon wrote:
> pgdat_page_ext_init() sets pgdat->node_page_ext to NULL only on
> FLATMEM. FLATMEM depends on !NUMA on every architecture, so the

Should we add "depends on !NUMA" to FLATMEM and FLATMEM_MANUAL to
prevent FLATMEM + NUMA being possible? Otherwise, FLATMEM + NUMA can
have issues with pgdat_page_ext_init() being removed. I understand that
no arch supports FLATMEM + NUMA.

> 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.
>
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> ---
>  include/linux/page_ext.h | 5 -----
>  mm/mm_init.c             | 1 -
>  mm/page_ext.c            | 9 ---------
>  3 files changed, 15 deletions(-)
>
> diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
> index f23d4b218da0..79c53ec45dfa 100644
> --- a/include/linux/page_ext.h
> +++ b/include/linux/page_ext.h
> @@ -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)
>  {
>  }
> diff --git a/mm/mm_init.c b/mm/mm_init.c
> index 711f821f7b3c..e9c4204b73ad 100644
> --- a/mm/mm_init.c
> +++ b/mm/mm_init.c
> @@ -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);
>  }
>  
> diff --git a/mm/page_ext.c b/mm/page_ext.c
> index e2e92bd27ebd..b679a8c1f7d7 100644
> --- a/mm/page_ext.c
> +++ b/mm/page_ext.c
> @@ -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
>  
>  /**




-- 
Best Regards,
Yan, Zi



  reply	other threads:[~2026-08-04  1:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 13:48 [PATCH] mm/page_ext: remove pgdat_page_ext_init() Sang-Heon Jeon
2026-08-04  1:35 ` Zi Yan [this message]
2026-08-04  4:17   ` Sang-Heon Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DKFRUZVRDMIZ.Q5GDFVAD25Q5@nvidia.com \
    --to=ziy@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=brendan.jackman@linux.dev \
    --cc=david@kernel.org \
    --cc=ekffu200098@gmail.com \
    --cc=hannes@cmpxchg.org \
    --cc=liam@infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox