Re: [PATCH 1/4] mm/hugetlb: Enable PUD level huge page migration

From: Anshuman Khandual
Date: Tue Oct 02 2018 - 08:56:57 EST




On 10/02/2018 06:08 PM, Suzuki K Poulose wrote:
> Hi Anshuman
>
> On 02/10/18 13:15, Anshuman Khandual wrote:
>> Architectures like arm64 have PUD level HugeTLB pages for certain configs
>> (1GB huge page is PUD based on ARM64_4K_PAGES base page size) that can be
>> enabled for migration. It can be achieved through checking for PUD_SHIFT
>> order based HugeTLB pages during migration.
>>
>> Signed-off-by: Anshuman Khandual <anshuman.khandual@xxxxxxx>
>> ---
>> Â include/linux/hugetlb.h | 3 ++-
>> Â 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
>> index 6b68e34..9c1b77f 100644
>> --- a/include/linux/hugetlb.h
>> +++ b/include/linux/hugetlb.h
>> @@ -483,7 +483,8 @@ static inline bool hugepage_migration_supported(struct hstate *h)
>> Â {
>> Â #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
>> ÂÂÂÂÂ if ((huge_page_shift(h) == PMD_SHIFT) ||
>> -ÂÂÂÂÂÂÂ (huge_page_shift(h) == PGDIR_SHIFT))
>> +ÂÂÂÂÂÂÂ (huge_page_shift(h) == PUD_SHIFT) ||
>
>
>> +ÂÂÂÂÂÂÂÂÂÂÂ (huge_page_shift(h) == PGDIR_SHIFT))
>
> nit: Extra Tab ^^.

The tab is in there when you apply this patch and all three checks are tab separated
in a newline.

> Also, if only arm64 supports PUD_SHIFT, should this be added only in the arm64 specific backend, which we introduce later ?

Even if with the platform can add this up in the back end, I would think having this
on for default fall back function makes it complete.