<div dir="ltr">Hi,<div><br></div><div>I guess it's normal that the hugepages reserve memory even if on process is using them. I have the same situation, but I know having 16GB of memoory, I don't have enough to give 8GB to the hugepages, 8GB to the VM and 8GB to the host.</div><div>So I think you are fine.</div><div><br></div><div>Alex</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 11, 2016 at 6:52 PM, sL1pKn07 SpinFlo <span dir="ltr"><<a href="mailto:sl1pkn07@gmail.com" target="_blank">sl1pkn07@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
I have add hugepages on my VM. but when launch the VM and run 'grep<br>
Huge /proc/meminfo' on the host, the value is the same when the VM is<br>
close<br>
<br>
i'm not sure if i missing any step<br>
<br>
in /etc/libvirt/qemu.conf:<br>
<br>
hugetlbfs_mount = "/dev/hugepages"<br>
<br>
in the VM XML:<br>
<br>
  <memoryBacking><br>
   <hugepages/><br>
 </memoryBacking><br>
<br>
in my system, Hugepages is mounted by systemd:<br>
└───╼  systemctl |grep huge<br>
dev-hugepages.mount<br>
<br>
                loaded active mounted   Huge Pages File System<br>
<br>
└───╼  mount |grep huge<br>
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)<br>
<br>
└───╼  find /dev/hugepages<br>
/dev/hugepages<br>
/dev/hugepages/libvirt<br>
/dev/hugepages/libvirt/qemu<br>
<br>
└───╼  ls -R /dev/hugepages<br>
/dev/hugepages:<br>
total 0<br>
drwxr-xr-x  3 root root    0 ene 11 17:14 .<br>
drwxr-xr-x 19 root root 3880 ene 11 17:14 ..<br>
drwxr-xr-x  3 root root    0 ene 11 17:14 libvirt<br>
<br>
/dev/hugepages/libvirt:<br>
total 0<br>
drwxr-xr-x 3 root root 0 ene 11 17:14 .<br>
drwxr-xr-x 3 root root 0 ene 11 17:14 ..<br>
drwxr-xr-x 2 root kvm  0 ene 11 17:33 qemu<br>
<br>
/dev/hugepages/libvirt/qemu:<br>
total 0<br>
drwxr-xr-x 2 root kvm  0 ene 11 17:33 .<br>
drwxr-xr-x 3 root root 0 ene 11 17:14 ..<br>
<br>
└───╼  cat /etc/sysctl.d/10-kvm.conf<br>
vm.nr_hugepages=6144<br>
<br>
VM OFF<br>
└───╼  grep Huge /proc/meminfo<br>
AnonHugePages:  13309952 kB<br>
HugePages_Total:    6144<br>
HugePages_Free:     6140<br>
HugePages_Rsvd:        0<br>
HugePages_Surp:        0<br>
Hugepagesize:       2048 kB<br>
<br>
VM ON (with some programs open)<br>
└───╼  grep Huge /proc/meminfo<br>
AnonHugePages:  13309952 kB<br>
HugePages_Total:    6144<br>
HugePages_Free:     6140<br>
HugePages_Rsvd:        0<br>
HugePages_Surp:        0<br>
Hugepagesize:       2048 kB<br>
<br>
archlinux<br>
Linux sL1pKn07 4.3.3-2-ARCH #1 SMP PREEMPT Wed Dec 23 20:09:18 CET<br>
2015 x86_64 GNU/Linux<br>
libvirt from git 6e27701<br>
qemu from git ccd54b6 (from Gerd Hoffmann's branch (linux-imput))<br>
Windows10 guest installed before add hugepages options<br>
<br>
greetings<br>
<br>
_______________________________________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
</blockquote></div><br></div>