Re: [PATCH 6/6] mm: rename ARCH_ENABLE_THP_MIGRATION to ARCH_SUPPORTS_PMD_SOFTLEAF
From: Zi Yan
Date: Wed Jul 01 2026 - 16:39:26 EST
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.
[1] https://lore.kernel.org/linux-mm/20180426142804.180152-1-zi.yan@xxxxxxxx/
Best Regards,
Yan, Zi