Re: [PATCH v1 18/29] mm: remove __folio_test_movable()

Harry Yoo
2025-07-02T10:22:54Z

On Mon, Jun 30, 2025 at 02:59:59PM +0200, David Hildenbrand wrote:
> Convert to page_has_movable_ops(). While at it, cleanup relevant code
> a bit.
>
> The data_race() in migrate_folio_unmap() is questionable: we already
> hold a page reference, and concurrent modifications can no longer
> happen (iow: __ClearPageMovable() no longer exists). Drop it for now,
> we'll rework page_has_movable_ops() soon either way to no longer
> rely on page->mapping.
>
> Wherever we cast from folio to page now is a clear sign that this
> code has to be decoupled.
>
> Reviewed-by: Zi Yan <ziy@nvidia.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---

LGTM

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

> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 098bcc821fc74..103dfc729a823 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1658,9 +1658,11 @@ unsigned int reclaim_clean_pages_from_list(struct zone *zone,
> unsigned int noreclaim_flag;
>
> list_for_each_entry_safe(folio, next, folio_list, lru) {
> + /* TODO: these pages should not even appear in this list. */
> + if (page_has_movable_ops(&folio->page))
> + continue;

Looking forward to see how this TODO will be addressed :)

--
Cheers,
Harry / Hyeonggon