Re: [PATCH] mm/huge_memory.c: introduce split_unmapped_folio_to_order
From: Lorenzo Stoakes
Date: Thu Nov 13 2025 - 11:03:04 EST
On Thu, Nov 13, 2025 at 04:36:01PM +0100, Francois Dugast wrote:
> Hi Balbir,
>
> On Wed, Nov 12, 2025 at 03:46:33PM +1100, Balbir Singh wrote:
> > Unmapped was added as a parameter to __folio_split() and related
> > call sites to support splitting of folios already in the midst
> > of a migration. This special case arose for device private folio
> > migration since during migration there could be a disconnect between
> > source and destination on the folio size.
> >
> > Introduce split_unmapped_folio_to_order() to handle this special case.
> > This in turn removes the special casing introduced by the unmapped
> > parameter in __folio_split().
>
> Such a helper would be needed in drm_pagemap_migrate_to_devmem when
> reallocating a device folio to smaller pages.
>
> Could we export it (EXPORT_SYMBOL)?
As a rule we don't export things from core mm. And certainly not to non-GPL
modules.
Unless David feels very differently or there's some enormously compelling
reason for it I'd really rather we didn't.
Cheers, Lorenzo