From: "David Hildenbrand (Red Hat)" <david@kernel.org>
To: Zi Yan <ziy@nvidia.com>, Francois Dugast <francois.dugast@intel.com>
Cc: "Lorenzo Stoakes" <lorenzo.stoakes@oracle.com>,
"Balbir Singh" <balbirs@nvidia.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org,
"Joshua Hahn" <joshua.hahnjy@gmail.com>,
"Rakie Kim" <rakie.kim@sk.com>,
"Byungchul Park" <byungchul@sk.com>,
"Gregory Price" <gourry@gourry.net>,
"Ying Huang" <ying.huang@linux.alibaba.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Oscar Salvador" <osalvador@suse.de>,
"Baolin Wang" <baolin.wang@linux.alibaba.com>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
"Nico Pache" <npache@redhat.com>,
"Ryan Roberts" <ryan.roberts@arm.com>,
"Dev Jain" <dev.jain@arm.com>, "Barry Song" <baohua@kernel.org>,
"Lyude Paul" <lyude@redhat.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Ralph Campbell" <rcampbell@nvidia.com>,
"Mika Penttilä" <mpenttil@redhat.com>,
"Matthew Brost" <matthew.brost@intel.com>
Subject: Re: [PATCH] mm/huge_memory.c: introduce split_unmapped_folio_to_order
Date: Thu, 13 Nov 2025 20:07:24 +0100 [thread overview]
Message-ID: <75d2254e-51ea-4e59-b706-86664e6c4bab@kernel.org> (raw)
In-Reply-To: <389A23ED-106B-413C-B13F-BB0F1E90B6C8@nvidia.com>
On 13.11.25 17:24, Zi Yan wrote:
> On 13 Nov 2025, at 11:02, Lorenzo Stoakes wrote:
>
>> 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)?
>
> drm_pagemap_migrate_to_devmem() is a function defined in tree, you
> just need to include huge_mm.h to use split_unmapped_folio_to_order().
> Why do you need to export split_unmapped_folio_to_order()?
I guess because DRM_GPUSVM is tristate, so can be built as a module.
IIUC, that's where drm_pagemap_migrate_to_devmem() ends up.
>
>>
>> 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.
We'd need a pretty good reason to go down that path indeed :)
--
Cheers
David
prev parent reply other threads:[~2025-11-13 19:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-12 4:46 Balbir Singh
2025-11-12 4:46 ` [PATCH] mm/huge_memory: softleaf device private fixes in remove_migration_pmd() Balbir Singh
2025-11-12 11:37 ` David Hildenbrand (Red Hat)
2025-11-13 5:03 ` Balbir Singh
2025-11-13 7:32 ` David Hildenbrand (Red Hat)
2025-11-12 13:43 ` Lorenzo Stoakes
2025-11-12 21:07 ` Balbir Singh
2025-11-12 23:55 ` Balbir Singh
2025-11-12 10:00 ` [PATCH] mm/huge_memory.c: introduce split_unmapped_folio_to_order David Hildenbrand (Red Hat)
2025-11-12 10:17 ` Balbir Singh
2025-11-12 11:34 ` David Hildenbrand (Red Hat)
2025-11-12 23:49 ` Balbir Singh
2025-11-13 21:39 ` Balbir Singh
2025-11-13 21:45 ` Zi Yan
2025-11-13 21:56 ` Balbir Singh
2025-11-14 0:23 ` Zi Yan
2025-11-18 20:17 ` David Hildenbrand (Red Hat)
2025-11-13 15:36 ` Francois Dugast
2025-11-13 16:02 ` Lorenzo Stoakes
2025-11-13 16:24 ` Zi Yan
2025-11-13 19:07 ` David Hildenbrand (Red Hat) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=75d2254e-51ea-4e59-b706-86664e6c4bab@kernel.org \
--to=david@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=balbirs@nvidia.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=byungchul@sk.com \
--cc=dakr@kernel.org \
--cc=dev.jain@arm.com \
--cc=francois.dugast@intel.com \
--cc=gourry@gourry.net \
--cc=joshua.hahnjy@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=lyude@redhat.com \
--cc=matthew.brost@intel.com \
--cc=mpenttil@redhat.com \
--cc=npache@redhat.com \
--cc=osalvador@suse.de \
--cc=rakie.kim@sk.com \
--cc=rcampbell@nvidia.com \
--cc=ryan.roberts@arm.com \
--cc=simona@ffwll.ch \
--cc=ying.huang@linux.alibaba.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox