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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux