mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] mm/page_ext: remove unused page_ext_iter_get()
@ 2026-11-17 16:26 Shivank Garg
  2026-11-17 17:04 ` Zi Yan
  2026-11-17 18:50 ` Vlastimil Babka (SUSE)
  0 siblings, 2 replies; 4+ messages in thread
From: Shivank Garg @ 2026-11-17 16:26 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
	Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
	Suren Baghdasaryan, Michal Hocko, Johannes Weiner,
	Brendan Jackman, Zi Yan, Luiz Capitulino
  Cc: linux-mm, linux-kernel, Shivank Garg

It was added in commit 9039b9096ea2 ("mm: page_ext: add an iteration API
for page extensions") but has never had a caller.

Signed-off-by: Shivank Garg <shivankg@amd.com>
---
I found this with the kunused scripts [1], which I wrote with LLM's
help. The v1 cover letter [2] has more details on the scripts and
how LLM was used.

Changes in v2:
- Split out of v1 [1], as David suggested, and based on
  page_alloc/for-next. No changes to the patch itself.

[1] https://github.com/AMDESE/linux-mm/tree/shivank/kunused
[2] https://lore.kernel.org/r/20261026-unused-sym-v1-0-82ca2dceabe1@amd.com
---
 include/linux/page_ext.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
index 79c53ec45dfa..52a8b70c525a 100644
--- a/include/linux/page_ext.h
+++ b/include/linux/page_ext.h
@@ -167,17 +167,6 @@ static inline struct page_ext *page_ext_iter_next(struct page_ext_iter *iter,
 	return iter->page_ext;
 }
 
-/**
- * page_ext_iter_get() - Get current page extension
- * @iter: page extension iterator.
- *
- * Return: NULL if no page_ext exists for this iterator.
- */
-static inline struct page_ext *page_ext_iter_get(const struct page_ext_iter *iter)
-{
-	return iter->page_ext;
-}
-
 /**
  * for_each_page_ext(): iterate through page_ext objects.
  * @__page: the page we're interested in

---
base-commit: 3a99594e62fce8c646e8aac01d38af16d6833a40
change-id: 20261109-unused-sym-page-ext-3fb8316ac777

Best regards,
-- 
Shivank Garg <shivankg@amd.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] mm/page_ext: remove unused page_ext_iter_get()
  2026-11-17 16:26 [PATCH v2] mm/page_ext: remove unused page_ext_iter_get() Shivank Garg
@ 2026-11-17 17:04 ` Zi Yan
  2026-11-17 18:50 ` Vlastimil Babka (SUSE)
  1 sibling, 0 replies; 4+ messages in thread
From: Zi Yan @ 2026-11-17 17:04 UTC (permalink / raw)
  To: Shivank Garg
  Cc: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
	Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
	Suren Baghdasaryan, Michal Hocko, Johannes Weiner,
	Brendan Jackman, Luiz Capitulino, linux-mm, linux-kernel

On 17 Nov 2026, at 11:26, Shivank Garg wrote:

> It was added in commit 9039b9096ea2 ("mm: page_ext: add an iteration API
> for page extensions") but has never had a caller.
>
> Signed-off-by: Shivank Garg <shivankg@amd.com>
> ---
> I found this with the kunused scripts [1], which I wrote with LLM's
> help. The v1 cover letter [2] has more details on the scripts and
> how LLM was used.
>
> Changes in v2:
> - Split out of v1 [1], as David suggested, and based on
>   page_alloc/for-next. No changes to the patch itself.
>
> [1] https://github.com/AMDESE/linux-mm/tree/shivank/kunused
> [2] https://lore.kernel.org/r/20261026-unused-sym-v1-0-82ca2dceabe1@amd.com
> ---
>  include/linux/page_ext.h | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
> index 79c53ec45dfa..52a8b70c525a 100644
> --- a/include/linux/page_ext.h
> +++ b/include/linux/page_ext.h
> @@ -167,17 +167,6 @@ static inline struct page_ext *page_ext_iter_next(struct page_ext_iter *iter,
>  	return iter->page_ext;
>  }
>
LGTM.

Reviewed-by: Zi Yan <ziy@nvidia.com>

Best Regards,
Yan, Zi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] mm/page_ext: remove unused page_ext_iter_get()
  2026-11-17 16:26 [PATCH v2] mm/page_ext: remove unused page_ext_iter_get() Shivank Garg
  2026-11-17 17:04 ` Zi Yan
@ 2026-11-17 18:50 ` Vlastimil Babka (SUSE)
  2026-11-17 19:13   ` Andrew Morton
  1 sibling, 1 reply; 4+ messages in thread
From: Vlastimil Babka (SUSE) @ 2026-11-17 18:50 UTC (permalink / raw)
  To: Shivank Garg, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
	Liam R. Howlett, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
	Johannes Weiner, Brendan Jackman, Zi Yan, Luiz Capitulino
  Cc: linux-mm, linux-kernel

On 11/17/26 17:26, Shivank Garg wrote:
> It was added in commit 9039b9096ea2 ("mm: page_ext: add an iteration API
> for page extensions") but has never had a caller.
> 
> Signed-off-by: Shivank Garg <shivankg@amd.com>

Added to page_alloc.git for-next, thanks!

Hm page_ext.h should be added to the PAGE ALLOCATOR section. Wonder if
Andrew's patches adding various missing bits included that too.

> ---
> I found this with the kunused scripts [1], which I wrote with LLM's
> help. The v1 cover letter [2] has more details on the scripts and
> how LLM was used.
> 
> Changes in v2:
> - Split out of v1 [1], as David suggested, and based on
>   page_alloc/for-next. No changes to the patch itself.
> 
> [1] https://github.com/AMDESE/linux-mm/tree/shivank/kunused
> [2] https://lore.kernel.org/r/20261026-unused-sym-v1-0-82ca2dceabe1@amd.com
> ---
>  include/linux/page_ext.h | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
> index 79c53ec45dfa..52a8b70c525a 100644
> --- a/include/linux/page_ext.h
> +++ b/include/linux/page_ext.h
> @@ -167,17 +167,6 @@ static inline struct page_ext *page_ext_iter_next(struct page_ext_iter *iter,
>  	return iter->page_ext;
>  }
>  
> -/**
> - * page_ext_iter_get() - Get current page extension
> - * @iter: page extension iterator.
> - *
> - * Return: NULL if no page_ext exists for this iterator.
> - */
> -static inline struct page_ext *page_ext_iter_get(const struct page_ext_iter *iter)
> -{
> -	return iter->page_ext;
> -}
> -
>  /**
>   * for_each_page_ext(): iterate through page_ext objects.
>   * @__page: the page we're interested in
> 
> ---
> base-commit: 3a99594e62fce8c646e8aac01d38af16d6833a40
> change-id: 20261109-unused-sym-page-ext-3fb8316ac777
> 
> Best regards,


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] mm/page_ext: remove unused page_ext_iter_get()
  2026-11-17 18:50 ` Vlastimil Babka (SUSE)
@ 2026-11-17 19:13   ` Andrew Morton
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2026-11-17 19:13 UTC (permalink / raw)
  To: Vlastimil Babka (SUSE)
  Cc: Shivank Garg, David Hildenbrand, Lorenzo Stoakes,
	Liam R. Howlett, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
	Johannes Weiner, Brendan Jackman, Zi Yan, Luiz Capitulino,
	linux-mm, linux-kernel

On Tue, 17 Nov 2026 19:50:09 +0100 "Vlastimil Babka (SUSE)" <vbabka@kernel.org> wrote:

> On 11/17/26 17:26, Shivank Garg wrote:
> > It was added in commit 9039b9096ea2 ("mm: page_ext: add an iteration API
> > for page extensions") but has never had a caller.
> > 
> > Signed-off-by: Shivank Garg <shivankg@amd.com>
> 
> Added to page_alloc.git for-next, thanks!

Thanks.  Helps.

> Hm page_ext.h should be added to the PAGE ALLOCATOR section. Wonder if
> Andrew's patches adding various missing bits included that too.

Nope.  I'll add the below.

A few things under mm/ include page_ext.h so perhaps more mentions are
needed.

I'm presently carrying no patches which alter page_ext.h or page_ext.c



From: Andrew Morton <akpm@linux-foundation.org>
Subject: MAINTAINERS: add page_ext.h to MEMORY MANAGEMENT - PAGE ALLOCATOR
Date: Tue Nov 17 11:05:44 AM PST 2026

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>

 MAINTAINERS |    1 +
 1 file changed, 1 insertion(+)

--- a/MAINTAINERS~a
+++ a/MAINTAINERS
@@ -17779,6 +17779,7 @@ F:	include/linux/compaction.h
 F:	include/linux/gfp.h
 F:	include/linux/page-isolation.h
 F:	include/linux/pageblock-flags.h
+F:	include/linux/page_ext.h
 F:	include/trace/events/compaction.h
 F:	include/trace/events/page_isolation.h
 F:	include/trace/events/page_ref.h
_


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-17 19:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17 16:26 [PATCH v2] mm/page_ext: remove unused page_ext_iter_get() Shivank Garg
2026-11-17 17:04 ` Zi Yan
2026-11-17 18:50 ` Vlastimil Babka (SUSE)
2026-11-17 19:13   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®