Re: [PATCH v8 00/14] mm: thp: always enable mTHP support

From: David Hildenbrand (Arm)

Date: Fri Sep 18 2026 - 16:23:40 EST


On 9/18/26 16:01, Luiz Capitulino wrote:
>
>
> On 9/18/26 6:37 AM, Usama Arif wrote:
>>
>>
>> On 18/09/2026 02:45, Luiz Capitulino wrote:
>>> Introduction
>>> ============
>>>
>>> Today, if an architecture implements has_transparent_hugepage() and the CPU
>>> lacks support for PMD-sized pages, the THP code disables all THP, including
>>> mTHP.
>>
>>
>> Hi Luiz,
>>
>> Sorry for asking this so late in the series, but which CPUs lack support for
>> PMD sized pages?
>>
>> Is this series mainly for PowerPC?
>
> No :)
>
> The architectures that have conditional PMD page support (ie. discovered
> at run-time via has_transparent_hugepage()) are x86, s390, powerpc and
> mips.
>
> For x86 for example, even on 64-bit there are cases where the PSE bit
> may not be present (eg. some errata and by hypervisor CPUID masking).
>
> That being said, the main goal of the series is that
> has_transparent_hugepage() is overloaded: it has different semantics on
> those architectures and is used to gate all THP support (which is not
> the right thing to do for mTHP).

Yes, and I hope that we can then follow-up with similar PUD support cleanup to
rework some of that CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD magic.

--
Cheers,

David