[PATCH v4 2/3] powerpc/mm/hugetlb: Add support for reserving gigantic huge pages via kernel command line
Aneesh Kumar K.V
aneesh.kumar at linux.vnet.ibm.com
Wed Aug 2 17:31:21 AEST 2017
Christophe LEROY <christophe.leroy at c-s.fr> writes:
> Hi,
>
> Le 28/07/2017 à 07:01, Aneesh Kumar K.V a écrit :
>> With commit aa888a74977a8 ("hugetlb: support larger than MAX_ORDER") we added
>> support for allocating gigantic hugepages via kernel command line. Switch
>> ppc64 arch specific code to use that.
>>
>> W.r.t FSL support, we now limit our allocation range using BOOTMEM_ALLOC_ACCESSIBLE.
>>
>> We use the kernel command line to do reservation of hugetlb pages on powernv
>> platforms. On pseries hash mmu mode the supported gigantic huge page size is
>> 16GB and that can only be allocated with hypervisor assist. For pseries the
>> command line option doesn't do the allocation. Instead pseries does gigantic
>> hugepage allocation based on hypervisor hint that is specified via
>> "ibm,expected#pages" property of the memory node.
>
> It looks like it doesn't work on the 8xx:
>
> root at vgoip:~# dmesg | grep -i huge
> [ 0.000000] Kernel command line: console=ttyCPM0,115200N8
> ip=172.25.231.25:172.25.231.1::255.0.0.0:vgoip:eth0:off hugepagesz=8M
> hugepages=4
> [ 0.416722] HugeTLB registered 8.00 MiB page size, pre-allocated 4 pages
> [ 0.423184] HugeTLB registered 512 KiB page size, pre-allocated 0 pages
> root at vgoip:~# cat /proc/meminfo
> MemTotal: 123388 kB
> MemFree: 77900 kB
> MemAvailable: 78412 kB
> Buffers: 0 kB
> Cached: 3964 kB
> SwapCached: 0 kB
> Active: 3788 kB
> Inactive: 1680 kB
> Active(anon): 1636 kB
> Inactive(anon): 20 kB
> Active(file): 2152 kB
> Inactive(file): 1660 kB
> Unevictable: 0 kB
> Mlocked: 0 kB
> SwapTotal: 0 kB
> SwapFree: 0 kB
> Dirty: 0 kB
> Writeback: 0 kB
> AnonPages: 1552 kB
> Mapped: 2404 kB
> Shmem: 152 kB
> Slab: 0 kB
> SReclaimable: 0 kB
> SUnreclaim: 0 kB
> KernelStack: 304 kB
> PageTables: 208 kB
> NFS_Unstable: 0 kB
> Bounce: 0 kB
> WritebackTmp: 0 kB
> CommitLimit: 45308 kB
> Committed_AS: 16664 kB
> VmallocTotal: 866304 kB
> VmallocUsed: 0 kB
> VmallocChunk: 0 kB
> HugePages_Total: 0
> HugePages_Free: 0
> HugePages_Rsvd: 0
> HugePages_Surp: 0
> Hugepagesize: 512 kB
But you are printing above the default hugepaeg details. You haven't
changed that in kernel command line. What does
/sys/kernel/mm/hugepages/<hugepages-size>/nr_hugepages show ?
To change the default hugepage size you may want to use
default_hugepagesz=8M
-aneesh
More information about the Linuxppc-dev
mailing list