[PATCH RFC 08/29] mm/migrate: rename putback_movable_folio() to putback_movable_ops_page()
Zi Yan
ziy at nvidia.com
Thu Jun 19 05:25:46 AEST 2025
On 18 Jun 2025, at 15:18, Matthew Wilcox wrote:
> On Wed, Jun 18, 2025 at 03:10:10PM -0400, Zi Yan wrote:
>> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>>> + /*
>>> + * 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
More information about the Linuxppc-dev
mailing list