Thread (138 messages) 138 messages, 5 authors, 2025-07-03

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

From: Harry Yoo <hidden>
Date: 2025-07-02 10:22:54
Also in: linux-doc, linux-fsdevel, linux-mm, lkml, virtualization

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 <redacted>
---
LGTM

Reviewed-by: Harry Yoo <redacted>
quoted hunk ↗ jump to hunk
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help