[PATCH v1 10/29] mm/migrate: remove folio_test_movable() and folio_movable_ops()

David Hildenbrand posted 29 patches 3 months, 1 week ago
There is a newer version of this series
[PATCH v1 10/29] mm/migrate: remove folio_test_movable() and folio_movable_ops()
Posted by David Hildenbrand 3 months, 1 week ago
Folios will have nothing to do with movable_ops page migration. These
functions are now unused, so let's remove them.

Reviewed-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
 include/linux/migrate.h | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index c0ec7422837bd..c99a00d4ca27d 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -118,20 +118,6 @@ static inline void __ClearPageMovable(struct page *page)
 }
 #endif
 
-static inline bool folio_test_movable(struct folio *folio)
-{
-	return PageMovable(&folio->page);
-}
-
-static inline
-const struct movable_operations *folio_movable_ops(struct folio *folio)
-{
-	VM_BUG_ON(!__folio_test_movable(folio));
-
-	return (const struct movable_operations *)
-		((unsigned long)folio->mapping - PAGE_MAPPING_MOVABLE);
-}
-
 static inline
 const struct movable_operations *page_movable_ops(struct page *page)
 {
-- 
2.49.0
Re: [PATCH v1 10/29] mm/migrate: remove folio_test_movable() and folio_movable_ops()
Posted by Harry Yoo 3 months, 1 week ago
On Mon, Jun 30, 2025 at 02:59:51PM +0200, David Hildenbrand wrote:
> Folios will have nothing to do with movable_ops page migration. These
> functions are now unused, so let's remove them.
> 
> Reviewed-by: Zi Yan <ziy@nvidia.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---

Reviewed-by: Harry Yoo <harry.yoo@oracle.com>

-- 
Cheers,
Harry / Hyeonggon
Re: [PATCH v1 10/29] mm/migrate: remove folio_test_movable() and folio_movable_ops()
Posted by Lorenzo Stoakes 3 months, 1 week ago
On Mon, Jun 30, 2025 at 02:59:51PM +0200, David Hildenbrand wrote:
> Folios will have nothing to do with movable_ops page migration. These
> functions are now unused, so let's remove them.

Maybe worth mentioning that __folio_test_movable() is still a thing (for now).

>
> Reviewed-by: Zi Yan <ziy@nvidia.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>

Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>

> ---
>  include/linux/migrate.h | 14 --------------
>  1 file changed, 14 deletions(-)
>
> diff --git a/include/linux/migrate.h b/include/linux/migrate.h
> index c0ec7422837bd..c99a00d4ca27d 100644
> --- a/include/linux/migrate.h
> +++ b/include/linux/migrate.h
> @@ -118,20 +118,6 @@ static inline void __ClearPageMovable(struct page *page)
>  }
>  #endif
>
> -static inline bool folio_test_movable(struct folio *folio)
> -{
> -	return PageMovable(&folio->page);
> -}
> -
> -static inline
> -const struct movable_operations *folio_movable_ops(struct folio *folio)
> -{
> -	VM_BUG_ON(!__folio_test_movable(folio));
> -
> -	return (const struct movable_operations *)
> -		((unsigned long)folio->mapping - PAGE_MAPPING_MOVABLE);
> -}
> -
>  static inline
>  const struct movable_operations *page_movable_ops(struct page *page)
>  {
> --
> 2.49.0
>
Re: [PATCH v1 10/29] mm/migrate: remove folio_test_movable() and folio_movable_ops()
Posted by David Hildenbrand 3 months, 1 week ago
On 30.06.25 19:07, Lorenzo Stoakes wrote:
> On Mon, Jun 30, 2025 at 02:59:51PM +0200, David Hildenbrand wrote:
>> Folios will have nothing to do with movable_ops page migration. These
>> functions are now unused, so let's remove them.
> 
> Maybe worth mentioning that __folio_test_movable() is still a thing (for now).

"Note that __folio_test_movable() and friends will be removed separately 
next, after more rework."

Thanks!

-- 
Cheers,

David / dhildenb
Re: [PATCH v1 10/29] mm/migrate: remove folio_test_movable() and folio_movable_ops()
Posted by Lorenzo Stoakes 3 months, 1 week ago
On Tue, Jul 01, 2025 at 12:15:41PM +0200, David Hildenbrand wrote:
> On 30.06.25 19:07, Lorenzo Stoakes wrote:
> > On Mon, Jun 30, 2025 at 02:59:51PM +0200, David Hildenbrand wrote:
> > > Folios will have nothing to do with movable_ops page migration. These
> > > functions are now unused, so let's remove them.
> >
> > Maybe worth mentioning that __folio_test_movable() is still a thing (for now).
>
> "Note that __folio_test_movable() and friends will be removed separately
> next, after more rework."

Sounds good to me! :)

>
> Thanks!
>
> --
> Cheers,
>
> David / dhildenb
>