Bug 1135893
Summary: | qemu-kvm should report an error message when host's freehugepage memory < domain's memory | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Hu Jianwei <jiahu> |
Component: | qemu-kvm-rhev | Assignee: | Luiz Capitulino <lcapitulino> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | ajia, coli, dyuan, hhuang, honzhang, huding, jiahu, juli, juzhang, lcapitulino, mrezanin, mzhan, virt-maint, xfu |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-rhev-2.1.0-5.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-03-05 09:54:10 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Hu Jianwei
2014-09-01 06:29:55 UTC
Patch posted upstream: http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg01558.html Luiz, KVM QE want to try brew build as below, but it has been closed. Could you please provide it to QE again? Thanks. https://brewweb.devel.redhat.com/taskinfo?taskID=7929807 This bug can be reproduced with qemu-kvm-rhev-2.1.0-3.el7.x86_64 directly. # sysctl -a |grep vm.nr_hugepages vm.nr_hugepages = 2048 vm.nr_hugepages_mempolicy = 2048 # cat /proc/meminfo | grep -i huge AnonHugePages: 4096 kB HugePages_Total: 2048 HugePages_Free: 2048 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB Boot qemu-kvm process with this cli. /usr/libexec/qemu-kvm -M pc -m 5G -smp 4,maxcpus=160 -monitor stdio -mem-prealloc -mem-path /mnt/kvm_hugepage result: qemu-kvm quit. and don't print any message. I tested several scenarios. S1. -m 5G HugePages_Free:2048 fail S2. -m 4G HugePages_Free:2048 works S3 -m 2G HugePages_Free:1024 works S4 -m 2G HugePages_Free:512 fail BTW, seem when -m size >hugepages_Free about 2000 times. qemu-kvm will fail. Yes, whenever QEMU is assigned more hugepages than the host has available the problem will happen. Fix included in qemu-kvm-rhev-2.1.0-5.el7 Verify: Version of components: qemu-kvm-rhev-2.1.0-5.el7.x86_64 --- # mkdir /media/kvm_hugepage # mount -t hugetlbfs none /media/kvm_hugepage # echo 2048 > /proc/sys/vm/nr_hugepages # sysctl -a |grep vm.nr_hugepages vm.nr_hugepages = 254 vm.nr_hugepages_mempolicy = 254 # cat /proc/meminfo | grep -i huge AnonHugePages: 75776 kB HugePages_Total: 254 HugePages_Free: 254 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB # /usr/libexec/qemu-kvm -M pc -m 5G -smp 4,maxcpus=160 -monitor stdio -mem-prealloc -mem-path /media/kvm_hugepage QEMU 2.1.0 monitor - type 'help' for more information (qemu) qemu-kvm: unable to map backing store for hugepages: Cannot allocate memory Based on above testing, this bz has been verified. ========================== Reproduce: Version of components: qemu-kvm-rhev-2.1.0-2.el7.x86_64 --- # sysctl -a |grep vm.nr_hugepages vm.nr_hugepages = 254 vm.nr_hugepages_mempolicy = 254 # cat /proc/meminfo | grep -i huge AnonHugePages: 75776 kB HugePages_Total: 254 HugePages_Free: 254 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB # /usr/libexec/qemu-kvm -M pc -m 5G -smp 4,maxcpus=160 -monitor stdio -mem-prealloc -mem-path /media/kvm_hugepage QEMU 2.1.0 monitor - type 'help' for more information (qemu) Based on above testing, this bz has been reproduced. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0624.html |