Re: [PATCH 6/6] mm: rename ARCH_ENABLE_THP_MIGRATION to ARCH_SUPPORTS_PMD_SOFTLEAF
From: David Hildenbrand (Arm)
Date: Wed Jul 01 2026 - 16:53:36 EST
On 7/1/26 22:39, Zi Yan wrote:
> On 1 Jul 2026, at 16:03, David Hildenbrand (Arm) wrote:
>
>> On 6/30/26 18:34, Usama Arif wrote:
>>> CONFIG_ARCH_ENABLE_THP_MIGRATION started life gating just PMD-level
>>> migration entries, but has grown to gate the entire PMD-level softleaf
>>> machinery: migration entries, device-private entries, and soon swap
>>> entries.
>>
>> device-private really relies on migration support.
>>
>> See do_huge_pmd_device_private() where we migrate back to CPU memory.
>>
>> The whole concept is pased on migration. So that's why it currently makes sense.
>>
>> So "has grown to" is not quite accurate. It's a different story with swap
>> entries (that can exist even without migration support).
>>
>>
>>> Rename CONFIG_ARCH_ENABLE_THP_MIGRATION to CONFIG_ARCH_SUPPORTS_PMD
>>> _SOFTLEAF to make this clear. This is a pure rename: the set of
>>> selecting architectures (x86, arm64, s390, riscv, loongarch, and
>>> powerpc on PPC_BOOK3S_64) and the gating semantics are unchanged.
>>
>> Hm, that makes me wonder what it would take to make this all just be implicitly
>> supported by CONFIG_TRANSPARENT_HUGEPAGE.
>>
>> Looks like someone would have the courage to touch stuff like arc, mips and
>> sparc64 (+arm and x86, but that's less of a concern :) ).
>
> You mean me back in 2018[1]? ;)
>
> At least I got a no go for s390.
hah! and 8 years later it seems to exist upstream :)
commit 10dd5a0009898ba35eafeb6087e5c83b84742ff1
Author: Gerald Schaefer <gerald.schaefer@xxxxxxxxxxxxx>
Date: Tue Jul 29 13:16:19 2025 +0200
s390/mm: Enable THP_SWAP and THP_MIGRATION
After hugetlbfs PTE_MARKER support for s390 introduced region-third and
segment table swap entries, it is now possible to also enable THP_SWAP
and THP_MIGRATION for s390.
So, with that out of the way, could you revive your patchset?
--
Cheers,
David