Re: [PATCH v2 1/4] mm: Set folio swapbacked iff folios are dirty in try_to_unmap_one

David Hildenbrand
2025-01-13T13:23:43Z

On 13.01.25 14:19, David Hildenbrand wrote:
> On 13.01.25 04:38, Barry Song wrote:
>> From: Barry Song <v-songbaohua@oppo.com>
>>
>> The refcount may be temporarily or long-term increased, but this does
>> not change the fundamental nature of the folio already being lazy-
>> freed. Therefore, we only reset 'swapbacked' when we are certain the
>> folio is dirty and not droppable.
>>
>> Suggested-by: David Hildenbrand <david@redhat.com>
>> Signed-off-by: Barry Song <v-songbaohua@oppo.com>
>> ---
>
> Acked-by: David Hildenbrand <david@redhat.com>
>

Ah, should this have a Fixes: ?

Because of a speculative reference, we might not reclaim MADV_FREE
folios as we silently mark them as swapbacked again, which sounds fairly
wrong.

--
Cheers,

David / dhildenb