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

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

On 02/13/2017 02:52 AM, Jim Fehlig wrote:
> 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 &
>> ~(huge_page_mask(hstate_vma(vma)))))
>>                   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
>> size.
> 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?


what is the actual problem? I've tried to reproduce this by running vm
with 3.5G RAM backed by 1GB huge pages and the guest runs just fine. I
mean kvm guest. This is because at the cmd line level there is aligned

-m size=4194304k,slots=16,maxmem=8388608k

This is result of qemuDomainAlignMemorySizes(). So perhaps there's a bug
somewhere in the function?


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