Re: [PATCH v3 05/12] mm, swap: unify large folio allocation
From: David Hildenbrand (Arm)
Date: Tue May 12 2026 - 02:25:28 EST
On 5/11/26 18:44, Kairui Song wrote:
> On Mon, May 11, 2026 at 11:15 PM David Hildenbrand (Arm)
> <david@xxxxxxxxxx> wrote:
>>
>> On 5/11/26 16:37, Kairui Song wrote:
>>>
>>> Yes, the current status is a bit odd, about two years ago I also
>>> wanted to name it `swapin_direct()`.
>>> https://lore.kernel.org/linux-mm/20240326185032.72159-3-ryncsn@xxxxxxxxx/
>>>
>>> But actually ZRAM or shmem would also benefit from supporting unified
>>> readahead like this:
>>> https://lore.kernel.org/linux-mm/20240102175338.62012-6-ryncsn@xxxxxxxxx/
>>>
>>> So calling it `swapin_entry` seems more future-proof. At some point in
>>> the future we might remove `swapin_readahead`. All swapin operations
>>> could have a unified or at least a per-device readahead policy like
>>> the one in the link above, instead of the current policy where the
>>> caller must decide whether to perform readahead.
>>>
>>> But any suggestion on naming is welcome :)
>>
>> The other proposal
>>
>> https://lore.kernel.org/all/tencent_CD11FE9B4A0B362E95E776C5F679598FAA07@xxxxxx/
>>
>> calls it
>>
>> swapin_synchronous_folio
>>
>> Maybe just swapin_sync_io()/swapin_sync() or sth like that?
>
> Good idea, I can keep the swapin_sync name at this point. Sync io flag
> still may remain for a longer time.
BTW, I was also wondering whether the whole sync vs. readahead part could simply
be handled in a function called "swapin". moving that completely out of memory.c :)
Probably something for another cleanup.
--
Cheers,
David