Re: [PATCH v2 12/14] mm/shmem: fix truncate loop after boundary swapin failure

From: David Hildenbrand (Arm)

Date: Wed Oct 28 2026 - 05:02:56 EST


On 10/28/26 10:01, Baolin Wang wrote:
>
>
> On 10/28/26 4:21 PM, David Hildenbrand (Arm) wrote:
>> On 10/28/26 02:30, Baolin Wang wrote:
>>>
>>>
>>>
>>> Right. But ...
>>>
>>>
>>> IIRC, we originally avoided advancing start because a concurrent swapin fault
>>> could split the boundary large swap entry via shmem_split_large_entry(), leaving
>>> small swap entries below the new start.
>>>
>>> Sigh.
>>>
>>> There doesn't seem to be a simple fix. We may need to swap in the large entry as
>>> shmem_get_partial_folio() does, and then split the large folio. I'll work on
>>> this as a follow-up.
>>
>> Thanks!
>>
>> So you are fine with the patch as is to fix the endless loop?
>
> Yes, let's get this fixed first.
>
> Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>

Thanks, sending out v3 soonish!

--
Cheers,

David