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

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

 



On Tue, 06 Dec 2016 14:37:54 +0530 "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxxxxxxx> 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 ?
> 

Probably that would be more logical.  But I'm a bit concerned about
adding more stuff to /proc/meminfo from a performance point of view -
that file gets read from quite frequently and we've already put some
quite obscure things in there.  Probably we whould be careful about
this.

--
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]