Thread (87 messages) 87 messages, 5 authors, 2025-06-30

Re: [PATCH RFC 08/29] mm/migrate: rename putback_movable_folio() to putback_movable_ops_page()

From: Zi Yan <ziy@nvidia.com>
Date: 2025-06-18 19:26:03
Also in: linux-doc, linux-fsdevel, linux-mm, lkml, virtualization

On 18 Jun 2025, at 15:18, Matthew Wilcox wrote:
On Wed, Jun 18, 2025 at 03:10:10PM -0400, Zi Yan wrote:
quoted
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
quoted
+	/*
+	 * TODO: these pages will not be folios in the future. All
+	 * folio dependencies will have to be removed.
+	 */
+	struct folio *folio = page_folio(page);
+
+	VM_WARN_ON_ONCE_PAGE(!PageIsolated(page), page);
+	folio_lock(folio);
+	/* If the page was released by it's owner, there is nothing to do. */
+	if (PageMovable(page))
+		page_movable_ops(page)->putback_page(page);
+	ClearPageIsolated(page);
+	folio_unlock(folio);
+	folio_put(folio);
Why not use page version of lock, unlock, and put? Especially you are
thinking about not using folio for these pages. Just a question,
I am OK with current patch.
That would reintroduce unnecessary calls to compound_head().
Got it. But here page is not folio, so it cannot be a compound page.
Then, we will need page versions without compound_head() for
non compound pages. Could that happen in the future when only folio
can be compound and page is only order-0?

Best Regards,
Yan, Zi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help