Re: [PATCH] mm: make transparent hugepage size public

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/06/2016 01:07 AM, Aneesh Kumar K.V wrote:
> Hugh Dickins <hughd@xxxxxxxxxx> writes:
> 
>> Test programs want to know the size of a transparent hugepage.
>> While it is commonly the same as the size of a hugetlbfs page
>> (shown as Hugepagesize in /proc/meminfo), that is not always so:
>> powerpc implements transparent hugepages in a different way from
>> hugetlbfs pages, so it's coincidence when their sizes are the same;
>> and x86 and others can support more than one hugetlbfs page size.
>>
>> Add /sys/kernel/mm/transparent_hugepage/hpage_pmd_size to show the
>> THP size in bytes - it's the same for Anonymous and Shmem hugepages.
>> Call it hpage_pmd_size (after HPAGE_PMD_SIZE) rather than hpage_size,
>> in case some transparent support for pud and pgd pages is added later.
> 
> We have in /proc/meminfo
> 
> Hugepagesize:       2048 kB
> 
> Does it makes it easy for application to find THP page size also there ?

Nope.  That's the default hugetlbfs page size.  Even on x86, that can be
changed and _could_ be 1G.  If hugetlbfs is configured out, you also
won't get this in meminfo.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]