Re: [PATCH v3 14/14] mm/ksm: remove set_page_stable_node
From: Alex Shi
Date: Mon Apr 08 2024 - 03:01:01 EST
On 4/5/24 3:32 PM, David Hildenbrand wrote:
> On 25.03.24 13:49, alexs@xxxxxxxxxx wrote:
>> From: "Alex Shi (tencent)" <alexs@xxxxxxxxxx>
>>
>> Remove the func since all caller are gone. Also remove the
>> VM_BUG_ON_PAGE() because it's not applicable for a folio.
>
> Ehm, it is for small folios that we are working with here.
>
> Please keep that check and convert it into a warn.
>
> VM_WARN_ON_FOLIO(folio_test_anon(folio) && PageAnonExclusive(&folio->page), folio);
will take it. Thanks!
>
>> - page->mapping = (void *)((unsigned long)stable_node | PAGE_MAPPING_KSM);
>> -}
>> -
>> static inline void folio_set_stable_node(struct folio *folio,
>> struct ksm_stable_node *stable_node)
>> {
>> - set_page_stable_node(&folio->page, stable_node);
>> + folio->mapping = (void *)((unsigned long)stable_node | PAGE_MAPPING_KSM);
>> }
>> #ifdef CONFIG_SYSFS
>
>