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

[libvirt] 1GB huge pages and incompatible VM memory size

Hi All,

Matt encountered the following issue when using 1GB huge pages with libvirt

This problem turned out to be entirely my fault because I didn't round
the VM's memory size to a 1G multiple, and the kernel tried to split
the VMA at the end of the region, triggering this code in the kernel
do_mbind() path,

  static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
                unsigned long addr, int new_below)
          struct vm_area_struct *new;
          int err;

          if (is_vm_hugetlb_page(vma) && (addr &
                  return -EINVAL;

I have no idea how a less fortunate developer without access to MM
experts would have figured this out. It's a shame virsh didn't error
out when I initially setup 1G hugepages with an incompatible VM memory

What do folks think about improving libvirt to warn or error when using a VM memory size that is not compatible with the host hugepage configuration?


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