* [PATCH 1/8] mm: remove wait_on_page_writeback()
2026-11-02 22:54 [PATCH 0/8] mm: remove newly-unused page wrapper APIs Tal Zussman
@ 2026-11-02 22:54 ` Tal Zussman
2026-11-03 1:34 ` SJ Park
` (2 more replies)
2026-11-02 22:54 ` [PATCH 2/8] mm: remove end_page_writeback() Tal Zussman
` (7 subsequent siblings)
8 siblings, 3 replies; 35+ messages in thread
From: Tal Zussman @ 2026-11-02 22:54 UTC (permalink / raw)
To: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel, Tal Zussman
The last caller was converted to folio_wait_writeback(), so drop the
wait_on_page_writeback() compatibility wrapper and its declaration.
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
include/linux/pagemap.h | 1 -
mm/folio-compat.c | 6 ------
2 files changed, 7 deletions(-)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 73af18a37367..c0f7c06dc6fd 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -1299,7 +1299,6 @@ static inline int folio_wait_locked_killable(struct folio *folio)
}
void folio_end_read(struct folio *folio, bool success);
-void wait_on_page_writeback(struct page *page);
void folio_wait_writeback(struct folio *folio);
int folio_wait_writeback_killable(struct folio *folio);
void end_page_writeback(struct page *page);
diff --git a/mm/folio-compat.c b/mm/folio-compat.c
index 6212fdd6761a..f880110ac980 100644
--- a/mm/folio-compat.c
+++ b/mm/folio-compat.c
@@ -23,12 +23,6 @@ void end_page_writeback(struct page *page)
}
EXPORT_SYMBOL(end_page_writeback);
-void wait_on_page_writeback(struct page *page)
-{
- return folio_wait_writeback(page_folio(page));
-}
-EXPORT_SYMBOL_GPL(wait_on_page_writeback);
-
void mark_page_accessed(struct page *page)
{
folio_mark_accessed(page_folio(page));
--
2.39.5
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 1/8] mm: remove wait_on_page_writeback()
2026-11-02 22:54 ` [PATCH 1/8] mm: remove wait_on_page_writeback() Tal Zussman
@ 2026-11-03 1:34 ` SJ Park
2026-11-03 3:42 ` Zi Yan
2026-11-03 8:32 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: SJ Park @ 2026-11-03 1:34 UTC (permalink / raw)
To: Tal Zussman
Cc: SJ Park, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang, linux-fsdevel, linux-mm, linux-kernel
On Mon, 02 Nov 2026 17:54:06 -0500 Tal Zussman <tz2294@columbia.edu> wrote:
> The last caller was converted to folio_wait_writeback(), so drop the
> wait_on_page_writeback() compatibility wrapper and its declaration.
Makes sense to me.
>
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> Acked-by: David Hildenbrand (Arm) <david@kernel.org>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Reviewed-by: SJ Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 1/8] mm: remove wait_on_page_writeback()
2026-11-02 22:54 ` [PATCH 1/8] mm: remove wait_on_page_writeback() Tal Zussman
2026-11-03 1:34 ` SJ Park
@ 2026-11-03 3:42 ` Zi Yan
2026-11-03 8:32 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Zi Yan @ 2026-11-03 3:42 UTC (permalink / raw)
To: Tal Zussman, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Matthew Brost, Joshua Hahn,
Byungchul Park, Gregory Price, Ying Huang, Alistair Popple,
Jason Gunthorpe, John Hubbard, Peter Xu, Hugh Dickins,
Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel
On Mon Nov 2, 2026 at 5:54 PM EST, Tal Zussman wrote:
> The last caller was converted to folio_wait_writeback(), so drop the
> wait_on_page_writeback() compatibility wrapper and its declaration.
>
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> Acked-by: David Hildenbrand (Arm) <david@kernel.org>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
> ---
> include/linux/pagemap.h | 1 -
> mm/folio-compat.c | 6 ------
> 2 files changed, 7 deletions(-)
>
Acked-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 1/8] mm: remove wait_on_page_writeback()
2026-11-02 22:54 ` [PATCH 1/8] mm: remove wait_on_page_writeback() Tal Zussman
2026-11-03 1:34 ` SJ Park
2026-11-03 3:42 ` Zi Yan
@ 2026-11-03 8:32 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-11-03 8:32 UTC (permalink / raw)
To: Tal Zussman
Cc: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Zi Yan, Matthew Brost, Joshua Hahn, Byungchul Park,
Gregory Price, Ying Huang, Alistair Popple, Jason Gunthorpe,
John Hubbard, Peter Xu, Hugh Dickins, Baolin Wang, linux-fsdevel,
linux-mm, linux-kernel
On Mon, Nov 02, 2026 at 05:54:06PM -0500, Tal Zussman wrote:
> The last caller was converted to folio_wait_writeback(), so drop the
> wait_on_page_writeback() compatibility wrapper and its declaration.
>
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> Acked-by: David Hildenbrand (Arm) <david@kernel.org>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
LGTM!
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> include/linux/pagemap.h | 1 -
> mm/folio-compat.c | 6 ------
> 2 files changed, 7 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index 73af18a37367..c0f7c06dc6fd 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -1299,7 +1299,6 @@ static inline int folio_wait_locked_killable(struct folio *folio)
> }
>
> void folio_end_read(struct folio *folio, bool success);
> -void wait_on_page_writeback(struct page *page);
> void folio_wait_writeback(struct folio *folio);
> int folio_wait_writeback_killable(struct folio *folio);
> void end_page_writeback(struct page *page);
> diff --git a/mm/folio-compat.c b/mm/folio-compat.c
> index 6212fdd6761a..f880110ac980 100644
> --- a/mm/folio-compat.c
> +++ b/mm/folio-compat.c
> @@ -23,12 +23,6 @@ void end_page_writeback(struct page *page)
> }
> EXPORT_SYMBOL(end_page_writeback);
>
> -void wait_on_page_writeback(struct page *page)
> -{
> - return folio_wait_writeback(page_folio(page));
> -}
> -EXPORT_SYMBOL_GPL(wait_on_page_writeback);
> -
> void mark_page_accessed(struct page *page)
> {
> folio_mark_accessed(page_folio(page));
>
> --
> 2.39.5
>
--
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 2/8] mm: remove end_page_writeback()
2026-11-02 22:54 [PATCH 0/8] mm: remove newly-unused page wrapper APIs Tal Zussman
2026-11-02 22:54 ` [PATCH 1/8] mm: remove wait_on_page_writeback() Tal Zussman
@ 2026-11-02 22:54 ` Tal Zussman
2026-11-03 1:36 ` SJ Park
` (2 more replies)
2026-11-02 22:54 ` [PATCH 3/8] mm: remove clear_page_dirty_for_io() Tal Zussman
` (6 subsequent siblings)
8 siblings, 3 replies; 35+ messages in thread
From: Tal Zussman @ 2026-11-02 22:54 UTC (permalink / raw)
To: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel, Tal Zussman
There are no callers left. Update the two comments that still named
it to refer to folio_end_writeback().
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
include/linux/pagemap.h | 1 -
include/linux/writeback.h | 2 +-
mm/folio-compat.c | 6 ------
mm/migrate.c | 2 +-
4 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index c0f7c06dc6fd..692ce3867a1d 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -1301,7 +1301,6 @@ static inline int folio_wait_locked_killable(struct folio *folio)
void folio_end_read(struct folio *folio, bool success);
void folio_wait_writeback(struct folio *folio);
int folio_wait_writeback_killable(struct folio *folio);
-void end_page_writeback(struct page *page);
void folio_end_writeback(struct folio *folio);
void folio_end_writeback_no_dropbehind(struct folio *folio);
void folio_end_dropbehind(struct folio *folio);
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index b749a9a5a5ee..c50f404141b0 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -124,7 +124,7 @@ struct wb_domain {
* writeout speed.
*
* We do this by keeping a floating proportion between BDIs, based
- * on page writeback completions [end_page_writeback()]. Those
+ * on page writeback completions [folio_end_writeback()]. Those
* devices that write out pages fastest will get the larger share,
* while the slower will get a smaller share.
*
diff --git a/mm/folio-compat.c b/mm/folio-compat.c
index f880110ac980..9f2cd0ebfbbd 100644
--- a/mm/folio-compat.c
+++ b/mm/folio-compat.c
@@ -17,12 +17,6 @@ void unlock_page(struct page *page)
}
EXPORT_SYMBOL(unlock_page);
-void end_page_writeback(struct page *page)
-{
- return folio_end_writeback(page_folio(page));
-}
-EXPORT_SYMBOL(end_page_writeback);
-
void mark_page_accessed(struct page *page)
{
folio_mark_accessed(page_folio(page));
diff --git a/mm/migrate.c b/mm/migrate.c
index 94e8cd46c6db..953af633ec0d 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -859,7 +859,7 @@ void folio_migrate_flags(struct folio *newfolio, struct folio *folio)
/*
* PG_readahead shares the same bit with PG_reclaim. The above
- * end_page_writeback() may clear PG_readahead mistakenly, so set the
+ * folio_end_writeback() may clear PG_readahead mistakenly, so set the
* bit after that.
*/
if (folio_test_readahead(folio))
--
2.39.5
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 2/8] mm: remove end_page_writeback()
2026-11-02 22:54 ` [PATCH 2/8] mm: remove end_page_writeback() Tal Zussman
@ 2026-11-03 1:36 ` SJ Park
2026-11-03 3:43 ` Zi Yan
2026-11-03 8:33 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: SJ Park @ 2026-11-03 1:36 UTC (permalink / raw)
To: Tal Zussman
Cc: SJ Park, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang, linux-fsdevel, linux-mm, linux-kernel
On Mon, 02 Nov 2026 17:54:07 -0500 Tal Zussman <tz2294@columbia.edu> wrote:
> There are no callers left. Update the two comments that still named
> it to refer to folio_end_writeback().
Makes sense to me.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Reviewed-by: SJ Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 2/8] mm: remove end_page_writeback()
2026-11-02 22:54 ` [PATCH 2/8] mm: remove end_page_writeback() Tal Zussman
2026-11-03 1:36 ` SJ Park
@ 2026-11-03 3:43 ` Zi Yan
2026-11-03 8:33 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Zi Yan @ 2026-11-03 3:43 UTC (permalink / raw)
To: Tal Zussman, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Matthew Brost, Joshua Hahn,
Byungchul Park, Gregory Price, Ying Huang, Alistair Popple,
Jason Gunthorpe, John Hubbard, Peter Xu, Hugh Dickins,
Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel
On Mon Nov 2, 2026 at 5:54 PM EST, Tal Zussman wrote:
> There are no callers left. Update the two comments that still named
> it to refer to folio_end_writeback().
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
> ---
> include/linux/pagemap.h | 1 -
> include/linux/writeback.h | 2 +-
> mm/folio-compat.c | 6 ------
> mm/migrate.c | 2 +-
> 4 files changed, 2 insertions(+), 9 deletions(-)
>
Acked-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 2/8] mm: remove end_page_writeback()
2026-11-02 22:54 ` [PATCH 2/8] mm: remove end_page_writeback() Tal Zussman
2026-11-03 1:36 ` SJ Park
2026-11-03 3:43 ` Zi Yan
@ 2026-11-03 8:33 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-11-03 8:33 UTC (permalink / raw)
To: Tal Zussman
Cc: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Zi Yan, Matthew Brost, Joshua Hahn, Byungchul Park,
Gregory Price, Ying Huang, Alistair Popple, Jason Gunthorpe,
John Hubbard, Peter Xu, Hugh Dickins, Baolin Wang, linux-fsdevel,
linux-mm, linux-kernel
On Mon, Nov 02, 2026 at 05:54:07PM -0500, Tal Zussman wrote:
> There are no callers left. Update the two comments that still named
> it to refer to folio_end_writeback().
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
LGTM!
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> include/linux/pagemap.h | 1 -
> include/linux/writeback.h | 2 +-
> mm/folio-compat.c | 6 ------
> mm/migrate.c | 2 +-
> 4 files changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index c0f7c06dc6fd..692ce3867a1d 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -1301,7 +1301,6 @@ static inline int folio_wait_locked_killable(struct folio *folio)
> void folio_end_read(struct folio *folio, bool success);
> void folio_wait_writeback(struct folio *folio);
> int folio_wait_writeback_killable(struct folio *folio);
> -void end_page_writeback(struct page *page);
> void folio_end_writeback(struct folio *folio);
> void folio_end_writeback_no_dropbehind(struct folio *folio);
> void folio_end_dropbehind(struct folio *folio);
> diff --git a/include/linux/writeback.h b/include/linux/writeback.h
> index b749a9a5a5ee..c50f404141b0 100644
> --- a/include/linux/writeback.h
> +++ b/include/linux/writeback.h
> @@ -124,7 +124,7 @@ struct wb_domain {
> * writeout speed.
> *
> * We do this by keeping a floating proportion between BDIs, based
> - * on page writeback completions [end_page_writeback()]. Those
> + * on page writeback completions [folio_end_writeback()]. Those
> * devices that write out pages fastest will get the larger share,
> * while the slower will get a smaller share.
> *
> diff --git a/mm/folio-compat.c b/mm/folio-compat.c
> index f880110ac980..9f2cd0ebfbbd 100644
> --- a/mm/folio-compat.c
> +++ b/mm/folio-compat.c
> @@ -17,12 +17,6 @@ void unlock_page(struct page *page)
> }
> EXPORT_SYMBOL(unlock_page);
>
> -void end_page_writeback(struct page *page)
> -{
> - return folio_end_writeback(page_folio(page));
> -}
> -EXPORT_SYMBOL(end_page_writeback);
> -
> void mark_page_accessed(struct page *page)
> {
> folio_mark_accessed(page_folio(page));
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 94e8cd46c6db..953af633ec0d 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -859,7 +859,7 @@ void folio_migrate_flags(struct folio *newfolio, struct folio *folio)
>
> /*
> * PG_readahead shares the same bit with PG_reclaim. The above
> - * end_page_writeback() may clear PG_readahead mistakenly, so set the
> + * folio_end_writeback() may clear PG_readahead mistakenly, so set the
> * bit after that.
> */
> if (folio_test_readahead(folio))
>
> --
> 2.39.5
>
--
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 3/8] mm: remove clear_page_dirty_for_io()
2026-11-02 22:54 [PATCH 0/8] mm: remove newly-unused page wrapper APIs Tal Zussman
2026-11-02 22:54 ` [PATCH 1/8] mm: remove wait_on_page_writeback() Tal Zussman
2026-11-02 22:54 ` [PATCH 2/8] mm: remove end_page_writeback() Tal Zussman
@ 2026-11-02 22:54 ` Tal Zussman
2026-11-03 1:39 ` SJ Park
` (2 more replies)
2026-11-02 22:54 ` [PATCH 4/8] mm: remove attach_page_private() and detach_page_private() Tal Zussman
` (5 subsequent siblings)
8 siblings, 3 replies; 35+ messages in thread
From: Tal Zussman @ 2026-11-02 22:54 UTC (permalink / raw)
To: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel, Tal Zussman
There are no callers left. Point the comments that named it at
folio_clear_dirty_for_io() instead.
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
include/linux/pagemap.h | 1 -
mm/folio-compat.c | 6 ------
mm/gup.c | 6 +++---
mm/page-writeback.c | 2 +-
4 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 692ce3867a1d..9adfeae2153c 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -1315,7 +1315,6 @@ static inline void folio_cancel_dirty(struct folio *folio)
__folio_cancel_dirty(folio);
}
bool folio_clear_dirty_for_io(struct folio *folio);
-bool clear_page_dirty_for_io(struct page *page);
void folio_invalidate(struct folio *folio, size_t offset, size_t length);
bool noop_dirty_folio(struct address_space *mapping, struct folio *folio);
diff --git a/mm/folio-compat.c b/mm/folio-compat.c
index 9f2cd0ebfbbd..13d4d39e1896 100644
--- a/mm/folio-compat.c
+++ b/mm/folio-compat.c
@@ -42,12 +42,6 @@ int set_page_dirty_lock(struct page *page)
}
EXPORT_SYMBOL(set_page_dirty_lock);
-bool clear_page_dirty_for_io(struct page *page)
-{
- return folio_clear_dirty_for_io(page_folio(page));
-}
-EXPORT_SYMBOL(clear_page_dirty_for_io);
-
bool redirty_page_for_writepage(struct writeback_control *wbc,
struct page *page)
{
diff --git a/mm/gup.c b/mm/gup.c
index 7d43ce717b24..335dcb3a5c17 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -298,16 +298,16 @@ void unpin_user_pages_dirty_lock(struct page **pages, unsigned long npages,
folio = gup_folio_next(pages, npages, i, &nr);
/*
* Checking PageDirty at this point may race with
- * clear_page_dirty_for_io(), but that's OK. Two key
+ * folio_clear_dirty_for_io(), but that's OK. Two key
* cases:
*
* 1) This code sees the page as already dirty, so it
* skips the call to set_page_dirty(). That could happen
- * because clear_page_dirty_for_io() called
+ * because folio_clear_dirty_for_io() called
* folio_mkclean(), followed by set_page_dirty().
* However, now the page is going to get written back,
* which meets the original intention of setting it
- * dirty, so all is well: clear_page_dirty_for_io() goes
+ * dirty, so all is well: folio_clear_dirty_for_io() goes
* on to call TestClearPageDirty(), and write the page
* back.
*
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 0694ec4098f6..b56f2c91b0f2 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2821,7 +2821,7 @@ EXPORT_SYMBOL(folio_mark_dirty_lock);
* This cancels just the dirty bit on the kernel page itself, it does NOT
* actually remove dirty bits on any mmap's that may be around. It also
* leaves the page tagged dirty, so any sync activity will still find it on
- * the dirty lists, and in particular, clear_page_dirty_for_io() will still
+ * the dirty lists, and in particular, folio_clear_dirty_for_io() will still
* look at the dirty bits in the VM.
*
* Doing this should *normally* only ever be done when a page is truncated,
--
2.39.5
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 3/8] mm: remove clear_page_dirty_for_io()
2026-11-02 22:54 ` [PATCH 3/8] mm: remove clear_page_dirty_for_io() Tal Zussman
@ 2026-11-03 1:39 ` SJ Park
2026-11-03 3:44 ` Zi Yan
2026-11-03 8:34 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: SJ Park @ 2026-11-03 1:39 UTC (permalink / raw)
To: Tal Zussman
Cc: SJ Park, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang, linux-fsdevel, linux-mm, linux-kernel
On Mon, 02 Nov 2026 17:54:08 -0500 Tal Zussman <tz2294@columbia.edu> wrote:
> There are no callers left. Point the comments that named it at
> folio_clear_dirty_for_io() instead.
Looks good to me.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Reviewed-by: SJ Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 3/8] mm: remove clear_page_dirty_for_io()
2026-11-02 22:54 ` [PATCH 3/8] mm: remove clear_page_dirty_for_io() Tal Zussman
2026-11-03 1:39 ` SJ Park
@ 2026-11-03 3:44 ` Zi Yan
2026-11-03 8:34 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Zi Yan @ 2026-11-03 3:44 UTC (permalink / raw)
To: Tal Zussman, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Matthew Brost, Joshua Hahn,
Byungchul Park, Gregory Price, Ying Huang, Alistair Popple,
Jason Gunthorpe, John Hubbard, Peter Xu, Hugh Dickins,
Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel
On Mon Nov 2, 2026 at 5:54 PM EST, Tal Zussman wrote:
> There are no callers left. Point the comments that named it at
> folio_clear_dirty_for_io() instead.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
> ---
> include/linux/pagemap.h | 1 -
> mm/folio-compat.c | 6 ------
> mm/gup.c | 6 +++---
> mm/page-writeback.c | 2 +-
> 4 files changed, 4 insertions(+), 11 deletions(-)
>
Thanks for the cleanup.
Acked-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 3/8] mm: remove clear_page_dirty_for_io()
2026-11-02 22:54 ` [PATCH 3/8] mm: remove clear_page_dirty_for_io() Tal Zussman
2026-11-03 1:39 ` SJ Park
2026-11-03 3:44 ` Zi Yan
@ 2026-11-03 8:34 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-11-03 8:34 UTC (permalink / raw)
To: Tal Zussman
Cc: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Zi Yan, Matthew Brost, Joshua Hahn, Byungchul Park,
Gregory Price, Ying Huang, Alistair Popple, Jason Gunthorpe,
John Hubbard, Peter Xu, Hugh Dickins, Baolin Wang, linux-fsdevel,
linux-mm, linux-kernel
On Mon, Nov 02, 2026 at 05:54:08PM -0500, Tal Zussman wrote:
> There are no callers left. Point the comments that named it at
> folio_clear_dirty_for_io() instead.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
LGTM!
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> include/linux/pagemap.h | 1 -
> mm/folio-compat.c | 6 ------
> mm/gup.c | 6 +++---
> mm/page-writeback.c | 2 +-
> 4 files changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index 692ce3867a1d..9adfeae2153c 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -1315,7 +1315,6 @@ static inline void folio_cancel_dirty(struct folio *folio)
> __folio_cancel_dirty(folio);
> }
> bool folio_clear_dirty_for_io(struct folio *folio);
> -bool clear_page_dirty_for_io(struct page *page);
> void folio_invalidate(struct folio *folio, size_t offset, size_t length);
> bool noop_dirty_folio(struct address_space *mapping, struct folio *folio);
>
> diff --git a/mm/folio-compat.c b/mm/folio-compat.c
> index 9f2cd0ebfbbd..13d4d39e1896 100644
> --- a/mm/folio-compat.c
> +++ b/mm/folio-compat.c
> @@ -42,12 +42,6 @@ int set_page_dirty_lock(struct page *page)
> }
> EXPORT_SYMBOL(set_page_dirty_lock);
>
> -bool clear_page_dirty_for_io(struct page *page)
> -{
> - return folio_clear_dirty_for_io(page_folio(page));
> -}
> -EXPORT_SYMBOL(clear_page_dirty_for_io);
> -
> bool redirty_page_for_writepage(struct writeback_control *wbc,
> struct page *page)
> {
> diff --git a/mm/gup.c b/mm/gup.c
> index 7d43ce717b24..335dcb3a5c17 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -298,16 +298,16 @@ void unpin_user_pages_dirty_lock(struct page **pages, unsigned long npages,
> folio = gup_folio_next(pages, npages, i, &nr);
> /*
> * Checking PageDirty at this point may race with
> - * clear_page_dirty_for_io(), but that's OK. Two key
> + * folio_clear_dirty_for_io(), but that's OK. Two key
> * cases:
> *
> * 1) This code sees the page as already dirty, so it
> * skips the call to set_page_dirty(). That could happen
> - * because clear_page_dirty_for_io() called
> + * because folio_clear_dirty_for_io() called
> * folio_mkclean(), followed by set_page_dirty().
> * However, now the page is going to get written back,
> * which meets the original intention of setting it
> - * dirty, so all is well: clear_page_dirty_for_io() goes
> + * dirty, so all is well: folio_clear_dirty_for_io() goes
> * on to call TestClearPageDirty(), and write the page
> * back.
> *
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index 0694ec4098f6..b56f2c91b0f2 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -2821,7 +2821,7 @@ EXPORT_SYMBOL(folio_mark_dirty_lock);
> * This cancels just the dirty bit on the kernel page itself, it does NOT
> * actually remove dirty bits on any mmap's that may be around. It also
> * leaves the page tagged dirty, so any sync activity will still find it on
> - * the dirty lists, and in particular, clear_page_dirty_for_io() will still
> + * the dirty lists, and in particular, folio_clear_dirty_for_io() will still
> * look at the dirty bits in the VM.
> *
> * Doing this should *normally* only ever be done when a page is truncated,
>
> --
> 2.39.5
>
--
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 4/8] mm: remove attach_page_private() and detach_page_private()
2026-11-02 22:54 [PATCH 0/8] mm: remove newly-unused page wrapper APIs Tal Zussman
` (2 preceding siblings ...)
2026-11-02 22:54 ` [PATCH 3/8] mm: remove clear_page_dirty_for_io() Tal Zussman
@ 2026-11-02 22:54 ` Tal Zussman
2026-11-03 1:40 ` SJ Park
` (2 more replies)
2026-11-02 22:54 ` [PATCH 5/8] mm: remove find_get_page_flags() Tal Zussman
` (4 subsequent siblings)
8 siblings, 3 replies; 35+ messages in thread
From: Tal Zussman @ 2026-11-02 22:54 UTC (permalink / raw)
To: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel, Tal Zussman
There are no callers left of either wrapper. Remove them.
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
include/linux/pagemap.h | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 9adfeae2153c..37b7786350c5 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -635,16 +635,6 @@ static inline void *folio_detach_private(struct folio *folio)
return data;
}
-static inline void attach_page_private(struct page *page, void *data)
-{
- folio_attach_private(page_folio(page), data);
-}
-
-static inline void *detach_page_private(struct page *page)
-{
- return folio_detach_private(page_folio(page));
-}
-
#ifdef CONFIG_NUMA
struct folio *filemap_alloc_folio_noprof(gfp_t gfp, unsigned int order,
struct mempolicy *policy);
--
2.39.5
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 4/8] mm: remove attach_page_private() and detach_page_private()
2026-11-02 22:54 ` [PATCH 4/8] mm: remove attach_page_private() and detach_page_private() Tal Zussman
@ 2026-11-03 1:40 ` SJ Park
2026-11-03 3:44 ` Zi Yan
2026-11-03 8:34 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: SJ Park @ 2026-11-03 1:40 UTC (permalink / raw)
To: Tal Zussman
Cc: SJ Park, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang, linux-fsdevel, linux-mm, linux-kernel
On Mon, 02 Nov 2026 17:54:09 -0500 Tal Zussman <tz2294@columbia.edu> wrote:
> There are no callers left of either wrapper. Remove them.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Reviewed-by: SJ Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 4/8] mm: remove attach_page_private() and detach_page_private()
2026-11-02 22:54 ` [PATCH 4/8] mm: remove attach_page_private() and detach_page_private() Tal Zussman
2026-11-03 1:40 ` SJ Park
@ 2026-11-03 3:44 ` Zi Yan
2026-11-03 8:34 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Zi Yan @ 2026-11-03 3:44 UTC (permalink / raw)
To: Tal Zussman, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Matthew Brost, Joshua Hahn,
Byungchul Park, Gregory Price, Ying Huang, Alistair Popple,
Jason Gunthorpe, John Hubbard, Peter Xu, Hugh Dickins,
Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel
On Mon Nov 2, 2026 at 5:54 PM EST, Tal Zussman wrote:
> There are no callers left of either wrapper. Remove them.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
> ---
> include/linux/pagemap.h | 10 ----------
> 1 file changed, 10 deletions(-)
>
Acked-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 4/8] mm: remove attach_page_private() and detach_page_private()
2026-11-02 22:54 ` [PATCH 4/8] mm: remove attach_page_private() and detach_page_private() Tal Zussman
2026-11-03 1:40 ` SJ Park
2026-11-03 3:44 ` Zi Yan
@ 2026-11-03 8:34 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-11-03 8:34 UTC (permalink / raw)
To: Tal Zussman
Cc: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Zi Yan, Matthew Brost, Joshua Hahn, Byungchul Park,
Gregory Price, Ying Huang, Alistair Popple, Jason Gunthorpe,
John Hubbard, Peter Xu, Hugh Dickins, Baolin Wang, linux-fsdevel,
linux-mm, linux-kernel
On Mon, Nov 02, 2026 at 05:54:09PM -0500, Tal Zussman wrote:
> There are no callers left of either wrapper. Remove them.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
LGTM!
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> include/linux/pagemap.h | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index 9adfeae2153c..37b7786350c5 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -635,16 +635,6 @@ static inline void *folio_detach_private(struct folio *folio)
> return data;
> }
>
> -static inline void attach_page_private(struct page *page, void *data)
> -{
> - folio_attach_private(page_folio(page), data);
> -}
> -
> -static inline void *detach_page_private(struct page *page)
> -{
> - return folio_detach_private(page_folio(page));
> -}
> -
> #ifdef CONFIG_NUMA
> struct folio *filemap_alloc_folio_noprof(gfp_t gfp, unsigned int order,
> struct mempolicy *policy);
>
> --
> 2.39.5
>
--
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 5/8] mm: remove find_get_page_flags()
2026-11-02 22:54 [PATCH 0/8] mm: remove newly-unused page wrapper APIs Tal Zussman
` (3 preceding siblings ...)
2026-11-02 22:54 ` [PATCH 4/8] mm: remove attach_page_private() and detach_page_private() Tal Zussman
@ 2026-11-02 22:54 ` Tal Zussman
2026-11-03 1:41 ` SJ Park
` (2 more replies)
2026-11-02 22:54 ` [PATCH 6/8] mm: remove find_lock_page() Tal Zussman
` (3 subsequent siblings)
8 siblings, 3 replies; 35+ messages in thread
From: Tal Zussman @ 2026-11-02 22:54 UTC (permalink / raw)
To: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel, Tal Zussman
There are no callers left. Remove it.
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
include/linux/pagemap.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 37b7786350c5..00e32f96b459 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -846,12 +846,6 @@ static inline struct page *find_get_page(struct address_space *mapping,
return pagecache_get_page(mapping, offset, 0, 0);
}
-static inline struct page *find_get_page_flags(struct address_space *mapping,
- pgoff_t offset, fgf_t fgp_flags)
-{
- return pagecache_get_page(mapping, offset, fgp_flags, 0);
-}
-
/**
* find_lock_page - locate, pin and lock a pagecache page
* @mapping: the address_space to search
--
2.39.5
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 5/8] mm: remove find_get_page_flags()
2026-11-02 22:54 ` [PATCH 5/8] mm: remove find_get_page_flags() Tal Zussman
@ 2026-11-03 1:41 ` SJ Park
2026-11-03 3:45 ` Zi Yan
2026-11-03 8:35 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: SJ Park @ 2026-11-03 1:41 UTC (permalink / raw)
To: Tal Zussman
Cc: SJ Park, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang, linux-fsdevel, linux-mm, linux-kernel
On Mon, 02 Nov 2026 17:54:10 -0500 Tal Zussman <tz2294@columbia.edu> wrote:
> There are no callers left. Remove it.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Reviewed-by: SJ Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 5/8] mm: remove find_get_page_flags()
2026-11-02 22:54 ` [PATCH 5/8] mm: remove find_get_page_flags() Tal Zussman
2026-11-03 1:41 ` SJ Park
@ 2026-11-03 3:45 ` Zi Yan
2026-11-03 8:35 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Zi Yan @ 2026-11-03 3:45 UTC (permalink / raw)
To: Tal Zussman, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Matthew Brost, Joshua Hahn,
Byungchul Park, Gregory Price, Ying Huang, Alistair Popple,
Jason Gunthorpe, John Hubbard, Peter Xu, Hugh Dickins,
Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel
On Mon Nov 2, 2026 at 5:54 PM EST, Tal Zussman wrote:
> There are no callers left. Remove it.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Acked-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 5/8] mm: remove find_get_page_flags()
2026-11-02 22:54 ` [PATCH 5/8] mm: remove find_get_page_flags() Tal Zussman
2026-11-03 1:41 ` SJ Park
2026-11-03 3:45 ` Zi Yan
@ 2026-11-03 8:35 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-11-03 8:35 UTC (permalink / raw)
To: Tal Zussman
Cc: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Zi Yan, Matthew Brost, Joshua Hahn, Byungchul Park,
Gregory Price, Ying Huang, Alistair Popple, Jason Gunthorpe,
John Hubbard, Peter Xu, Hugh Dickins, Baolin Wang, linux-fsdevel,
linux-mm, linux-kernel
On Mon, Nov 02, 2026 at 05:54:10PM -0500, Tal Zussman wrote:
> There are no callers left. Remove it.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
LGTM
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> include/linux/pagemap.h | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index 37b7786350c5..00e32f96b459 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -846,12 +846,6 @@ static inline struct page *find_get_page(struct address_space *mapping,
> return pagecache_get_page(mapping, offset, 0, 0);
> }
>
> -static inline struct page *find_get_page_flags(struct address_space *mapping,
> - pgoff_t offset, fgf_t fgp_flags)
> -{
> - return pagecache_get_page(mapping, offset, fgp_flags, 0);
> -}
> -
> /**
> * find_lock_page - locate, pin and lock a pagecache page
> * @mapping: the address_space to search
>
> --
> 2.39.5
>
--
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 6/8] mm: remove find_lock_page()
2026-11-02 22:54 [PATCH 0/8] mm: remove newly-unused page wrapper APIs Tal Zussman
` (4 preceding siblings ...)
2026-11-02 22:54 ` [PATCH 5/8] mm: remove find_get_page_flags() Tal Zussman
@ 2026-11-02 22:54 ` Tal Zussman
2026-11-03 1:43 ` SJ Park
` (2 more replies)
2026-11-02 22:54 ` [PATCH 7/8] mm: remove read_cache_page_gfp() Tal Zussman
` (2 subsequent siblings)
8 siblings, 3 replies; 35+ messages in thread
From: Tal Zussman @ 2026-11-02 22:54 UTC (permalink / raw)
To: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel, Tal Zussman
There are no callers left. Remove it. The name still appears in a
sample function graph trace in Documentation/trace/ftrace.rst, which
is recorded output and is left as it is.
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
include/linux/pagemap.h | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 00e32f96b459..a92329805acd 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -846,25 +846,6 @@ static inline struct page *find_get_page(struct address_space *mapping,
return pagecache_get_page(mapping, offset, 0, 0);
}
-/**
- * find_lock_page - locate, pin and lock a pagecache page
- * @mapping: the address_space to search
- * @index: the page index
- *
- * Looks up the page cache entry at @mapping & @index. If there is a
- * page cache page, it is returned locked and with an increased
- * refcount.
- *
- * Context: May sleep.
- * Return: A struct page or %NULL if there is no page in the cache for this
- * index.
- */
-static inline struct page *find_lock_page(struct address_space *mapping,
- pgoff_t index)
-{
- return pagecache_get_page(mapping, index, FGP_LOCK, 0);
-}
-
/**
* find_or_create_page - locate or add a pagecache page
* @mapping: the page's address_space
--
2.39.5
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 6/8] mm: remove find_lock_page()
2026-11-02 22:54 ` [PATCH 6/8] mm: remove find_lock_page() Tal Zussman
@ 2026-11-03 1:43 ` SJ Park
2026-11-03 3:46 ` Zi Yan
2026-11-03 8:36 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: SJ Park @ 2026-11-03 1:43 UTC (permalink / raw)
To: Tal Zussman
Cc: SJ Park, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang, linux-fsdevel, linux-mm, linux-kernel
On Mon, 02 Nov 2026 17:54:11 -0500 Tal Zussman <tz2294@columbia.edu> wrote:
> There are no callers left. Remove it. The name still appears in a
> sample function graph trace in Documentation/trace/ftrace.rst, which
> is recorded output and is left as it is.
Makes sense to me, the example could be updated later in my opinion.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Reviewed-by: SJ Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 6/8] mm: remove find_lock_page()
2026-11-02 22:54 ` [PATCH 6/8] mm: remove find_lock_page() Tal Zussman
2026-11-03 1:43 ` SJ Park
@ 2026-11-03 3:46 ` Zi Yan
2026-11-03 8:36 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Zi Yan @ 2026-11-03 3:46 UTC (permalink / raw)
To: Tal Zussman, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Matthew Brost, Joshua Hahn,
Byungchul Park, Gregory Price, Ying Huang, Alistair Popple,
Jason Gunthorpe, John Hubbard, Peter Xu, Hugh Dickins,
Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel
On Mon Nov 2, 2026 at 5:54 PM EST, Tal Zussman wrote:
> There are no callers left. Remove it. The name still appears in a
> sample function graph trace in Documentation/trace/ftrace.rst, which
> is recorded output and is left as it is.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
> ---
> include/linux/pagemap.h | 19 -------------------
> 1 file changed, 19 deletions(-)
>
Acked-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 6/8] mm: remove find_lock_page()
2026-11-02 22:54 ` [PATCH 6/8] mm: remove find_lock_page() Tal Zussman
2026-11-03 1:43 ` SJ Park
2026-11-03 3:46 ` Zi Yan
@ 2026-11-03 8:36 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-11-03 8:36 UTC (permalink / raw)
To: Tal Zussman
Cc: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Zi Yan, Matthew Brost, Joshua Hahn, Byungchul Park,
Gregory Price, Ying Huang, Alistair Popple, Jason Gunthorpe,
John Hubbard, Peter Xu, Hugh Dickins, Baolin Wang, linux-fsdevel,
linux-mm, linux-kernel
On Mon, Nov 02, 2026 at 05:54:11PM -0500, Tal Zussman wrote:
> There are no callers left. Remove it. The name still appears in a
> sample function graph trace in Documentation/trace/ftrace.rst, which
> is recorded output and is left as it is.
Yeah that's fair enough :)
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
LGTM!
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> include/linux/pagemap.h | 19 -------------------
> 1 file changed, 19 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index 00e32f96b459..a92329805acd 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -846,25 +846,6 @@ static inline struct page *find_get_page(struct address_space *mapping,
> return pagecache_get_page(mapping, offset, 0, 0);
> }
>
> -/**
> - * find_lock_page - locate, pin and lock a pagecache page
> - * @mapping: the address_space to search
> - * @index: the page index
> - *
> - * Looks up the page cache entry at @mapping & @index. If there is a
> - * page cache page, it is returned locked and with an increased
> - * refcount.
> - *
> - * Context: May sleep.
> - * Return: A struct page or %NULL if there is no page in the cache for this
> - * index.
> - */
> -static inline struct page *find_lock_page(struct address_space *mapping,
> - pgoff_t index)
> -{
> - return pagecache_get_page(mapping, index, FGP_LOCK, 0);
> -}
> -
> /**
> * find_or_create_page - locate or add a pagecache page
> * @mapping: the page's address_space
>
> --
> 2.39.5
>
--
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 7/8] mm: remove read_cache_page_gfp()
2026-11-02 22:54 [PATCH 0/8] mm: remove newly-unused page wrapper APIs Tal Zussman
` (5 preceding siblings ...)
2026-11-02 22:54 ` [PATCH 6/8] mm: remove find_lock_page() Tal Zussman
@ 2026-11-02 22:54 ` Tal Zussman
2026-11-03 1:45 ` SJ Park
` (2 more replies)
2026-11-02 22:54 ` [PATCH 8/8] mm: remove thp_size() and thp_order() Tal Zussman
2026-11-03 1:56 ` [PATCH 0/8] mm: remove newly-unused page wrapper APIs Andrew Morton
8 siblings, 3 replies; 35+ messages in thread
From: Tal Zussman @ 2026-11-02 22:54 UTC (permalink / raw)
To: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel, Tal Zussman
There are no callers left. Point the comment on shmem_read_folio_gfp()
at mapping_read_folio_gfp() instead.
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
include/linux/pagemap.h | 2 --
mm/filemap.c | 23 -----------------------
mm/shmem.c | 4 ++--
3 files changed, 2 insertions(+), 27 deletions(-)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index a92329805acd..305c99bad689 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -962,8 +962,6 @@ struct folio *mapping_read_folio_gfp(struct address_space *, pgoff_t index,
gfp_t flags);
struct page *read_cache_page(struct address_space *, pgoff_t index,
filler_t *filler, struct file *file);
-extern struct page * read_cache_page_gfp(struct address_space *mapping,
- pgoff_t index, gfp_t gfp_mask);
static inline struct page *read_mapping_page(struct address_space *mapping,
pgoff_t index, struct file *file)
diff --git a/mm/filemap.c b/mm/filemap.c
index 1df776907140..2b724d9be94b 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -4258,29 +4258,6 @@ struct page *read_cache_page(struct address_space *mapping,
}
EXPORT_SYMBOL(read_cache_page);
-/**
- * read_cache_page_gfp - read into page cache, using specified page allocation flags.
- * @mapping: the page's address_space
- * @index: the page index
- * @gfp: the page allocator flags to use if allocating
- *
- * This is the same as "read_mapping_page(mapping, index, NULL)", but with
- * any new page allocations done using the specified allocation flags.
- *
- * If the page does not get brought uptodate, return -EIO.
- *
- * The function expects mapping->invalidate_lock to be already held.
- *
- * Return: up to date page on success, ERR_PTR() on failure.
- */
-struct page *read_cache_page_gfp(struct address_space *mapping,
- pgoff_t index,
- gfp_t gfp)
-{
- return do_read_cache_page(mapping, index, NULL, NULL, gfp);
-}
-EXPORT_SYMBOL(read_cache_page_gfp);
-
/*
* Warn about a page cache invalidation failure during a direct I/O write.
*/
diff --git a/mm/shmem.c b/mm/shmem.c
index de838dbb4df8..16b1cc3d8ac5 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -6190,9 +6190,9 @@ int shmem_zero_setup_desc(struct vm_area_desc *desc)
* @index: the folio index
* @gfp: the page allocator flags to use if allocating
*
- * This behaves as a tmpfs "read_cache_page_gfp(mapping, index, gfp)",
+ * This behaves as a tmpfs "mapping_read_folio_gfp(mapping, index, gfp)",
* with any new page allocations done using the specified allocation flags.
- * But read_cache_page_gfp() uses the ->read_folio() method: which does not
+ * But mapping_read_folio_gfp() uses the ->read_folio() method: which does not
* suit tmpfs, since it may have pages in swapcache, and needs to find those
* for itself; although drivers/gpu/drm i915 and ttm rely upon this support.
*
--
2.39.5
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 7/8] mm: remove read_cache_page_gfp()
2026-11-02 22:54 ` [PATCH 7/8] mm: remove read_cache_page_gfp() Tal Zussman
@ 2026-11-03 1:45 ` SJ Park
2026-11-03 3:46 ` Zi Yan
2026-11-03 8:37 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: SJ Park @ 2026-11-03 1:45 UTC (permalink / raw)
To: Tal Zussman
Cc: SJ Park, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang, linux-fsdevel, linux-mm, linux-kernel
On Mon, 02 Nov 2026 17:54:12 -0500 Tal Zussman <tz2294@columbia.edu> wrote:
> There are no callers left. Point the comment on shmem_read_folio_gfp()
> at mapping_read_folio_gfp() instead.
Looks correct and good to me.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Reviewed-by: SJ Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 7/8] mm: remove read_cache_page_gfp()
2026-11-02 22:54 ` [PATCH 7/8] mm: remove read_cache_page_gfp() Tal Zussman
2026-11-03 1:45 ` SJ Park
@ 2026-11-03 3:46 ` Zi Yan
2026-11-03 8:37 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Zi Yan @ 2026-11-03 3:46 UTC (permalink / raw)
To: Tal Zussman, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Matthew Brost, Joshua Hahn,
Byungchul Park, Gregory Price, Ying Huang, Alistair Popple,
Jason Gunthorpe, John Hubbard, Peter Xu, Hugh Dickins,
Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel
On Mon Nov 2, 2026 at 5:54 PM EST, Tal Zussman wrote:
> There are no callers left. Point the comment on shmem_read_folio_gfp()
> at mapping_read_folio_gfp() instead.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
> ---
> include/linux/pagemap.h | 2 --
> mm/filemap.c | 23 -----------------------
> mm/shmem.c | 4 ++--
> 3 files changed, 2 insertions(+), 27 deletions(-)
>
Acked-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 7/8] mm: remove read_cache_page_gfp()
2026-11-02 22:54 ` [PATCH 7/8] mm: remove read_cache_page_gfp() Tal Zussman
2026-11-03 1:45 ` SJ Park
2026-11-03 3:46 ` Zi Yan
@ 2026-11-03 8:37 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-11-03 8:37 UTC (permalink / raw)
To: Tal Zussman
Cc: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Zi Yan, Matthew Brost, Joshua Hahn, Byungchul Park,
Gregory Price, Ying Huang, Alistair Popple, Jason Gunthorpe,
John Hubbard, Peter Xu, Hugh Dickins, Baolin Wang, linux-fsdevel,
linux-mm, linux-kernel
On Mon, Nov 02, 2026 at 05:54:12PM -0500, Tal Zussman wrote:
> There are no callers left. Point the comment on shmem_read_folio_gfp()
> at mapping_read_folio_gfp() instead.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
LGTM!
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> include/linux/pagemap.h | 2 --
> mm/filemap.c | 23 -----------------------
> mm/shmem.c | 4 ++--
> 3 files changed, 2 insertions(+), 27 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index a92329805acd..305c99bad689 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -962,8 +962,6 @@ struct folio *mapping_read_folio_gfp(struct address_space *, pgoff_t index,
> gfp_t flags);
> struct page *read_cache_page(struct address_space *, pgoff_t index,
> filler_t *filler, struct file *file);
> -extern struct page * read_cache_page_gfp(struct address_space *mapping,
> - pgoff_t index, gfp_t gfp_mask);
>
> static inline struct page *read_mapping_page(struct address_space *mapping,
> pgoff_t index, struct file *file)
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 1df776907140..2b724d9be94b 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -4258,29 +4258,6 @@ struct page *read_cache_page(struct address_space *mapping,
> }
> EXPORT_SYMBOL(read_cache_page);
>
> -/**
> - * read_cache_page_gfp - read into page cache, using specified page allocation flags.
> - * @mapping: the page's address_space
> - * @index: the page index
> - * @gfp: the page allocator flags to use if allocating
> - *
> - * This is the same as "read_mapping_page(mapping, index, NULL)", but with
> - * any new page allocations done using the specified allocation flags.
> - *
> - * If the page does not get brought uptodate, return -EIO.
> - *
> - * The function expects mapping->invalidate_lock to be already held.
> - *
> - * Return: up to date page on success, ERR_PTR() on failure.
> - */
> -struct page *read_cache_page_gfp(struct address_space *mapping,
> - pgoff_t index,
> - gfp_t gfp)
Also eliminates this very weird line-wrapping... :)
> -{
> - return do_read_cache_page(mapping, index, NULL, NULL, gfp);
> -}
> -EXPORT_SYMBOL(read_cache_page_gfp);
> -
> /*
> * Warn about a page cache invalidation failure during a direct I/O write.
> */
> diff --git a/mm/shmem.c b/mm/shmem.c
> index de838dbb4df8..16b1cc3d8ac5 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -6190,9 +6190,9 @@ int shmem_zero_setup_desc(struct vm_area_desc *desc)
> * @index: the folio index
> * @gfp: the page allocator flags to use if allocating
> *
> - * This behaves as a tmpfs "read_cache_page_gfp(mapping, index, gfp)",
> + * This behaves as a tmpfs "mapping_read_folio_gfp(mapping, index, gfp)",
> * with any new page allocations done using the specified allocation flags.
> - * But read_cache_page_gfp() uses the ->read_folio() method: which does not
> + * But mapping_read_folio_gfp() uses the ->read_folio() method: which does not
> * suit tmpfs, since it may have pages in swapcache, and needs to find those
> * for itself; although drivers/gpu/drm i915 and ttm rely upon this support.
> *
>
> --
> 2.39.5
>
--
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 8/8] mm: remove thp_size() and thp_order()
2026-11-02 22:54 [PATCH 0/8] mm: remove newly-unused page wrapper APIs Tal Zussman
` (6 preceding siblings ...)
2026-11-02 22:54 ` [PATCH 7/8] mm: remove read_cache_page_gfp() Tal Zussman
@ 2026-11-02 22:54 ` Tal Zussman
2026-11-03 1:48 ` SJ Park
` (2 more replies)
2026-11-03 1:56 ` [PATCH 0/8] mm: remove newly-unused page wrapper APIs Andrew Morton
8 siblings, 3 replies; 35+ messages in thread
From: Tal Zussman @ 2026-11-02 22:54 UTC (permalink / raw)
To: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel, Tal Zussman
The last callers of thp_size() have been converted to folio_size(), and
thp_order()'s only remaining user was thp_size() itself, so remove
both.
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
include/linux/mm.h | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 8b5883878538..143865580169 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2146,27 +2146,6 @@ static inline unsigned int page_shift(struct page *page)
return PAGE_SHIFT + compound_order(page);
}
-/**
- * thp_order - Order of a transparent huge page.
- * @page: Head page of a transparent huge page.
- */
-static inline unsigned int thp_order(struct page *page)
-{
- VM_BUG_ON_PGFLAGS(PageTail(page), page);
- return compound_order(page);
-}
-
-/**
- * thp_size - Size of a transparent huge page.
- * @page: Head page of a transparent huge page.
- *
- * Return: Number of bytes in this page.
- */
-static inline unsigned long thp_size(struct page *page)
-{
- return PAGE_SIZE << thp_order(page);
-}
-
#ifdef CONFIG_MMU
/*
* Do pte_mkwrite, but only if the vma says VM_WRITE. We do this when
--
2.39.5
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 8/8] mm: remove thp_size() and thp_order()
2026-11-02 22:54 ` [PATCH 8/8] mm: remove thp_size() and thp_order() Tal Zussman
@ 2026-11-03 1:48 ` SJ Park
2026-11-03 3:47 ` Zi Yan
2026-11-03 8:42 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: SJ Park @ 2026-11-03 1:48 UTC (permalink / raw)
To: Tal Zussman
Cc: SJ Park, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Zi Yan, Matthew Brost,
Joshua Hahn, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Jason Gunthorpe, John Hubbard, Peter Xu,
Hugh Dickins, Baolin Wang, linux-fsdevel, linux-mm, linux-kernel
On Mon, 02 Nov 2026 17:54:13 -0500 Tal Zussman <tz2294@columbia.edu> wrote:
> The last callers of thp_size() have been converted to folio_size(), and
> thp_order()'s only remaining user was thp_size() itself, so remove
> both.
Looks clean to me.
>
> Acked-by: David Hildenbrand (Arm) <david@kernel.org>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Reviewed-by: SJ Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 8/8] mm: remove thp_size() and thp_order()
2026-11-02 22:54 ` [PATCH 8/8] mm: remove thp_size() and thp_order() Tal Zussman
2026-11-03 1:48 ` SJ Park
@ 2026-11-03 3:47 ` Zi Yan
2026-11-03 8:42 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Zi Yan @ 2026-11-03 3:47 UTC (permalink / raw)
To: Tal Zussman, Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Matthew Brost, Joshua Hahn,
Byungchul Park, Gregory Price, Ying Huang, Alistair Popple,
Jason Gunthorpe, John Hubbard, Peter Xu, Hugh Dickins,
Baolin Wang
Cc: linux-fsdevel, linux-mm, linux-kernel
On Mon Nov 2, 2026 at 5:54 PM EST, Tal Zussman wrote:
> The last callers of thp_size() have been converted to folio_size(), and
> thp_order()'s only remaining user was thp_size() itself, so remove
> both.
>
> Acked-by: David Hildenbrand (Arm) <david@kernel.org>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
> ---
> include/linux/mm.h | 21 ---------------------
> 1 file changed, 21 deletions(-)
>
Acked-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 8/8] mm: remove thp_size() and thp_order()
2026-11-02 22:54 ` [PATCH 8/8] mm: remove thp_size() and thp_order() Tal Zussman
2026-11-03 1:48 ` SJ Park
2026-11-03 3:47 ` Zi Yan
@ 2026-11-03 8:42 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 35+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-11-03 8:42 UTC (permalink / raw)
To: Tal Zussman
Cc: Matthew Wilcox (Oracle),
Jan Kara, Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Zi Yan, Matthew Brost, Joshua Hahn, Byungchul Park,
Gregory Price, Ying Huang, Alistair Popple, Jason Gunthorpe,
John Hubbard, Peter Xu, Hugh Dickins, Baolin Wang, linux-fsdevel,
linux-mm, linux-kernel
On Mon, Nov 02, 2026 at 05:54:13PM -0500, Tal Zussman wrote:
> The last callers of thp_size() have been converted to folio_size(), and
> thp_order()'s only remaining user was thp_size() itself, so remove
> both.
>
> Acked-by: David Hildenbrand (Arm) <david@kernel.org>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
LGTM so:
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> include/linux/mm.h | 21 ---------------------
> 1 file changed, 21 deletions(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 8b5883878538..143865580169 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -2146,27 +2146,6 @@ static inline unsigned int page_shift(struct page *page)
> return PAGE_SHIFT + compound_order(page);
> }
>
> -/**
> - * thp_order - Order of a transparent huge page.
> - * @page: Head page of a transparent huge page.
> - */
> -static inline unsigned int thp_order(struct page *page)
> -{
> - VM_BUG_ON_PGFLAGS(PageTail(page), page);
> - return compound_order(page);
> -}
> -
> -/**
> - * thp_size - Size of a transparent huge page.
> - * @page: Head page of a transparent huge page.
> - *
> - * Return: Number of bytes in this page.
> - */
> -static inline unsigned long thp_size(struct page *page)
> -{
> - return PAGE_SIZE << thp_order(page);
> -}
> -
> #ifdef CONFIG_MMU
> /*
> * Do pte_mkwrite, but only if the vma says VM_WRITE. We do this when
>
> --
> 2.39.5
>
--
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 0/8] mm: remove newly-unused page wrapper APIs
2026-11-02 22:54 [PATCH 0/8] mm: remove newly-unused page wrapper APIs Tal Zussman
` (7 preceding siblings ...)
2026-11-02 22:54 ` [PATCH 8/8] mm: remove thp_size() and thp_order() Tal Zussman
@ 2026-11-03 1:56 ` Andrew Morton
2026-11-03 8:45 ` David Hildenbrand (Arm)
8 siblings, 1 reply; 35+ messages in thread
From: Andrew Morton @ 2026-11-03 1:56 UTC (permalink / raw)
To: Tal Zussman
Cc: Matthew Wilcox (Oracle),
Jan Kara, David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Zi Yan, Matthew Brost, Joshua Hahn, Byungchul Park,
Gregory Price, Ying Huang, Alistair Popple, Jason Gunthorpe,
John Hubbard, Peter Xu, Hugh Dickins, Baolin Wang, linux-fsdevel,
linux-mm, linux-kernel
On Mon, 02 Nov 2026 17:54:05 -0500 Tal Zussman <tz2294@columbia.edu> wrote:
> After some folio conversions done last cycle (namely ceph, f2fs, btrfs,
> fuse, and page_io.c), there are a number of newly-unused page APIs.
> Let's remove them and update comments as necessary.
>
> Patches 1 and 8 are taken from the ceph writeback folio series [1],
> along with tags.
Thanks.
> 9 files changed, 8 insertions(+), 110 deletions(-)
Tal, you obviously haven't been following along ;)
This development cycle is not the one for cleanups and new features,
but this one sneaks through!
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 0/8] mm: remove newly-unused page wrapper APIs
2026-11-03 1:56 ` [PATCH 0/8] mm: remove newly-unused page wrapper APIs Andrew Morton
@ 2026-11-03 8:45 ` David Hildenbrand (Arm)
0 siblings, 0 replies; 35+ messages in thread
From: David Hildenbrand (Arm) @ 2026-11-03 8:45 UTC (permalink / raw)
To: Andrew Morton, Tal Zussman
Cc: Matthew Wilcox (Oracle),
Jan Kara, Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka,
Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Zi Yan,
Matthew Brost, Joshua Hahn, Byungchul Park, Gregory Price,
Ying Huang, Alistair Popple, Jason Gunthorpe, John Hubbard,
Peter Xu, Hugh Dickins, Baolin Wang, linux-fsdevel, linux-mm,
linux-kernel
On 11/3/26 02:56, Andrew Morton wrote:
> On Mon, 02 Nov 2026 17:54:05 -0500 Tal Zussman <tz2294@columbia.edu> wrote:
>
>> After some folio conversions done last cycle (namely ceph, f2fs, btrfs,
>> fuse, and page_io.c), there are a number of newly-unused page APIs.
>> Let's remove them and update comments as necessary.
>>
>> Patches 1 and 8 are taken from the ceph writeback folio series [1],
>> along with tags.
>
> Thanks.
>
>> 9 files changed, 8 insertions(+), 110 deletions(-)
>
> Tal, you obviously haven't been following along ;)
>
>
I would pick this up after giving it a little bit more time for review.
> This development cycle is not the one for cleanups and new features,
> but this one sneaks through!
Yeah, the focus will be on fixes. But smaller stuff like this or some other
things we wanted to get finished for a while that are easy to handle can go in.
All bigger work likely has to wait.
--
Cheers,
David
^ permalink raw reply [flat|nested] 35+ messages in thread