[RFC PATCH] powerpc/mm/hugetlb: Add support for 1G huge pages

Aneesh Kumar K.V aneesh.kumar at linux.vnet.ibm.com
Wed Apr 5 16:33:01 AEST 2017



On Wednesday 05 April 2017 11:05 AM, Anshuman Khandual wrote:
> On 04/04/2017 07:33 PM, Aneesh Kumar K.V wrote:
>> This patch adds support for gigantic pages in ppc64. We also updates
>> gigantic_page_supported helper such that arch can override it.
>
> Seems like only radix based 1GB is considered as gigantic page in this
> implementation. What about the existing 16GB pages support ? IIUC they
> are still supported currently as gigantic pages (as defined in generic
> HugeTLB) if the platform gives us reserved memory areas during boot.
> Can you explain how this is going to be different ?
>
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
>> ---
>>  arch/powerpc/include/asm/book3s/64/hugetlb.h | 9 +++++++++
>>  arch/powerpc/mm/hugetlbpage.c                | 7 +++++--
>>  arch/powerpc/platforms/Kconfig.cputype       | 1 +
>>  mm/hugetlb.c                                 | 4 ++++
>>  4 files changed, 19 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/book3s/64/hugetlb.h b/arch/powerpc/include/asm/book3s/64/hugetlb.h
>> index 6666cd366596..a994d069fdaf 100644
>> --- a/arch/powerpc/include/asm/book3s/64/hugetlb.h
>> +++ b/arch/powerpc/include/asm/book3s/64/hugetlb.h
>> @@ -50,4 +50,13 @@ static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,
>>  	else
>>  		return entry;
>>  }
>> +
>> +#define gigantic_page_supported gigantic_page_supported
>> +static inline bool gigantic_page_supported(void)
>> +{
>> +	if (radix_enabled())
>> +		return true;
>> +	return false;
>> +}
>
> POWER8 (non radix MMU) cannot have 16GB gigantic HugeTLB pages ?

that helper determines whether we can do gigantic page allocation at 
runtime. I doubt we can do that for 16GB pages. Hence this is only 
enabled for 1G radix config


-aneesh



More information about the Linuxppc-dev mailing list