AnsweredAssumed Answered

1G HugeTLB Page

Question asked by Syamala Saripalli on Nov 14, 2018

Hi,

 

I am trying to change HugeTLB size from 256Mb to 1G.

I observe 1G page getting allocated in kernel.

 

[ 0.479637] HugeTLB registered 1 GB page size, pre-allocated 1 pages
[ 0.485914] HugeTLB registered 1 MB page size, pre-allocated 0 pages
[ 0.492253] HugeTLB registered 4 MB page size, pre-allocated 0 pages
[ 0.498595] HugeTLB registered 16 MB page size, pre-allocated 0 pages
[ 0.505028] HugeTLB registered 64 MB page size, pre-allocated 0 pages
[ 0.511453] HugeTLB registered 256 MB page size, pre-allocated 0 pages

 

/proc/sys/kernel/shmmax is also updated to 1G
Loading DSP image also fine. But any shmmat from app to allocated segment fails 

 

===B4860QDS DSP boot Application (3.0.0) ===
SYSTEM MAP
DSP PrivArea: Addr=c0000000 Size=3ff00000
Shared CtrlArea: Addr=fff00000 Size=100000
DSP Core0 M2: Addr=0 Size=0
DSP Core1 M2: Addr=0 Size=0
DSP M3: Addr=c40000000 Size=8000
PA CCSRBAR: Addr =ffe000000 Size=1000000
DSP CCSRBAR: Addr =ffe000000 Size=1000000
PA Shared Area: Addr=80000000 Size=3f000000
DSP Shared Area: Addr=bf000000 Size=1000000
Loading Dsp image /usr/bin/L1_cu_combined.bin

.........
sleep 1, waiting for hw sem
sleep 1, waiting for hw sem
HS_MPR[1]=0xfe
HS_MPR[1]=0x0

== DSP Booted up ==

 

[root@0005B932EFD4 /]# ipcs -m

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000002 0 root 600 1073741824 0

 

[root@0005B932EFD4 /]# cat /proc/meminfo | grep Huge
HugePages_Total: 1
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 1048576 kB

[root@0005B932EFD4 /]#

 

But from App, shmat fails for same shmid/key

dsplog -c showlog -n gstLOGDebugNC
SYSTEM MAP
DSP PrivArea: Addr=c0000000 Size=3ff00000
Shared CtrlArea: Addr=fff00000 Size=100000
DSP Core0 M2: Addr=0 Size=0
DSP Core1 M2: Addr=0 Size=0
DSP M3: Addr=c40000000 Size=8000
PA CCSRBAR: Addr =ffe000000 Size=1000000
DSP CCSRBAR: Addr =ffe000000 Size=1000000
shmat: Cannot allocate memory
Shared memory attach failure: Cannot allocate memory
Segmentation fault (core dumped)

 

 

Same works for 256Mb, but only fails for 1G. So, is there any constraint or config for 1G HugeTLB.

Outcomes