[pve-devel] [PATCH 1/2] add hugepages option

Alexandre DERUMIER aderumier at odiso.com
Fri May 13 05:35:22 CEST 2016


I have tested dynamic allocation/deallocation of 2M and 1G hugepages,

It's working for me (at least if memory is not too fragmented)

a simple

echo x > /sys/devices/system/node/nodeX/hugepages/hugepages-1048576kB/nr_hugepages
echo x > /sys/devices/system/node/nodeX/hugepages/hugepages-2048kB/nr_hugepages

is enough (need to be done for each numa node)

freehuges can be checked

cat /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/free_hugepages
cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/free_hugepages


Like this, user can if he want reserved hugepages at boot (sysctl or kernel options in grub).
And if he don't define hugepages or define not enough hugepages (free_hugepages counter),
we can try to allocate them for him.





----- Mail original -----
De: "aderumier" <aderumier at odiso.com>
À: "dietmar" <dietmar at proxmox.com>
Cc: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Vendredi 13 Mai 2016 05:21:20
Objet: Re: [pve-devel] [PATCH 1/2] add hugepages option

Another question, 

currently my patch manage only 1 size of hugepages. 

one /dev/hupagepages mount, with 2MB or 1GB hugepages. 

That mean that if user want to use 1GB hugepages, he can only define vm 
memory with multiple of 1GB (ex: 1,5G will not work) 

Technically, it's possible to allocate, 1pages of 1GB and 250pages of 2MB, 
with 2 mounts point. 

But It's a little bit more complex 

Opinions ? 


----- Mail original ----- 
De: "dietmar" <dietmar at proxmox.com> 
À: "aderumier" <aderumier at odiso.com> 
Cc: "pve-devel" <pve-devel at pve.proxmox.com> 
Envoyé: Jeudi 12 Mai 2016 17:32:41 
Objet: Re: [pve-devel] [PATCH 1/2] add hugepages option 

> but I have a default 
> 
> hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime) 

I wonder what program creates that? Will try to find out ... 

_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list