Re: [PATCH] mm/huge_memory: Fix outdated comment about freeing subpages in __folio_split

From: David Hildenbrand (Arm)

Date: Mon Apr 27 2026 - 03:43:09 EST


On 4/26/26 22:42, Barry Song wrote:
> On Thu, Apr 23, 2026 at 8:36 PM David Hildenbrand (Arm)
> <david@xxxxxxxxxx> wrote:
>>
>> On 4/23/26 05:49, Barry Song (Xiaomi) wrote:
>>> The comment appears to be outdated. First, add_to_swap() no longer
>>> exists after Kairui’s commit b487a2da3575 ("mm, swap: simplify folio
>>> swap allocation"). Second, partially zapped folios are now always
>>> split before folio_alloc_swap() to avoid extra I/O, following Ryan’s
>>> commit 5ed890ce5147 ("mm: vmscan: avoid split during
>>> shrink_folio_list()").
>>
>> Not necessarily. We have some scenarios where we have partially-mapped folios
>> not detected as such as of today (with CONFIG_NO_PAGE_MAPCOUNT).
>
> Thanks, david! would it make more sense to add “when
> CONFIG_PAGE_MAPCOUNT is enabled” at the end of the
> sentence?

Better to phrase it in a way that doesn't even require these details :)

Do we even need this detail in the patch description?

--
Cheers,

David