* [PATCH] mm/gup: remove no longer used gup_fast_undo_dev_pagemap
@ 2025-12-19 11:46 Kairui Song
2025-12-19 14:27 ` David Hildenbrand (Red Hat)
0 siblings, 1 reply; 3+ messages in thread
From: Kairui Song @ 2025-12-19 11:46 UTC (permalink / raw)
To: linux-mm
Cc: Andrew Morton, David Hildenbrand, Jason Gunthorpe, John Hubbard,
Peter Xu, Alistair Popple, linux-kernel, Kairui Song
From: Kairui Song <kasong@tencent.com>
This helper is no longer used after commit fd2825b0760a ("mm/gup: remove
pXX_devmap usage from get_user_pages()").
Signed-off-by: Kairui Song <kasong@tencent.com>
---
mm/gup.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/mm/gup.c b/mm/gup.c
index 95d948c8e86c..8e7dc2c6ee73 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -2806,17 +2806,6 @@ static bool gup_fast_folio_allowed(struct folio *folio, unsigned int flags)
return !reject_file_backed || shmem_mapping(mapping);
}
-static void __maybe_unused gup_fast_undo_dev_pagemap(int *nr, int nr_start,
- unsigned int flags, struct page **pages)
-{
- while ((*nr) - nr_start) {
- struct folio *folio = page_folio(pages[--(*nr)]);
-
- folio_clear_referenced(folio);
- gup_put_folio(folio, 1, flags);
- }
-}
-
#ifdef CONFIG_ARCH_HAS_PTE_SPECIAL
/*
* GUP-fast relies on pte change detection to avoid concurrent pgtable
---
base-commit: 67a1f192fe6d4c1ee84e296e7d518bb881d03c94
change-id: 20251219-gup-cleanup-8146b8884351
Best regards,
--
Kairui Song <kasong@tencent.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/gup: remove no longer used gup_fast_undo_dev_pagemap
2025-12-19 11:46 [PATCH] mm/gup: remove no longer used gup_fast_undo_dev_pagemap Kairui Song
@ 2025-12-19 14:27 ` David Hildenbrand (Red Hat)
2025-12-23 2:58 ` Alistair Popple
0 siblings, 1 reply; 3+ messages in thread
From: David Hildenbrand (Red Hat) @ 2025-12-19 14:27 UTC (permalink / raw)
To: Kairui Song, linux-mm
Cc: Andrew Morton, Jason Gunthorpe, John Hubbard, Peter Xu,
Alistair Popple, linux-kernel, Kairui Song
On 12/19/25 12:46, Kairui Song wrote:
> From: Kairui Song <kasong@tencent.com>
>
> This helper is no longer used after commit fd2825b0760a ("mm/gup: remove
> pXX_devmap usage from get_user_pages()").
>
> Signed-off-by: Kairui Song <kasong@tencent.com>
> ---
> mm/gup.c | 11 -----------
> 1 file changed, 11 deletions(-)
>
> diff --git a/mm/gup.c b/mm/gup.c
> index 95d948c8e86c..8e7dc2c6ee73 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -2806,17 +2806,6 @@ static bool gup_fast_folio_allowed(struct folio *folio, unsigned int flags)
> return !reject_file_backed || shmem_mapping(mapping);
> }
>
> -static void __maybe_unused gup_fast_undo_dev_pagemap(int *nr, int nr_start,
> - unsigned int flags, struct page **pages)
> -{
> - while ((*nr) - nr_start) {
> - struct folio *folio = page_folio(pages[--(*nr)]);
> -
> - folio_clear_referenced(folio);
> - gup_put_folio(folio, 1, flags);
> - }
> -}
> -
Thanks!
Acked-by: David Hildenbrand (Red Hat) <david@kernel.org>
--
Cheers
David
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/gup: remove no longer used gup_fast_undo_dev_pagemap
2025-12-19 14:27 ` David Hildenbrand (Red Hat)
@ 2025-12-23 2:58 ` Alistair Popple
0 siblings, 0 replies; 3+ messages in thread
From: Alistair Popple @ 2025-12-23 2:58 UTC (permalink / raw)
To: David Hildenbrand (Red Hat)
Cc: Kairui Song, linux-mm, Andrew Morton, Jason Gunthorpe,
John Hubbard, Peter Xu, linux-kernel, Kairui Song
On 2025-12-20 at 01:27 +1100, "David Hildenbrand (Red Hat)" <david@kernel.org> wrote...
> On 12/19/25 12:46, Kairui Song wrote:
> > From: Kairui Song <kasong@tencent.com>
> >
> > This helper is no longer used after commit fd2825b0760a ("mm/gup: remove
> > pXX_devmap usage from get_user_pages()").
Thanks for catching, we no longer have to treat the dev pagemap pages specially
so it makes sense this isn't needed.
Reviewed-by: Alistair Popple <apopple@nvidia.com>
> > Signed-off-by: Kairui Song <kasong@tencent.com>
> > ---
> > mm/gup.c | 11 -----------
> > 1 file changed, 11 deletions(-)
> >
> > diff --git a/mm/gup.c b/mm/gup.c
> > index 95d948c8e86c..8e7dc2c6ee73 100644
> > --- a/mm/gup.c
> > +++ b/mm/gup.c
> > @@ -2806,17 +2806,6 @@ static bool gup_fast_folio_allowed(struct folio *folio, unsigned int flags)
> > return !reject_file_backed || shmem_mapping(mapping);
> > }
> > -static void __maybe_unused gup_fast_undo_dev_pagemap(int *nr, int nr_start,
> > - unsigned int flags, struct page **pages)
> > -{
> > - while ((*nr) - nr_start) {
> > - struct folio *folio = page_folio(pages[--(*nr)]);
> > -
> > - folio_clear_referenced(folio);
> > - gup_put_folio(folio, 1, flags);
> > - }
> > -}
> > -
>
> Thanks!
>
> Acked-by: David Hildenbrand (Red Hat) <david@kernel.org>
>
> --
> Cheers
>
> David
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-23 2:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-19 11:46 [PATCH] mm/gup: remove no longer used gup_fast_undo_dev_pagemap Kairui Song
2025-12-19 14:27 ` David Hildenbrand (Red Hat)
2025-12-23 2:58 ` Alistair Popple
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox