Bug 1211918
| Summary: | when boot a guest with mlock=on,the nr_mlock of /proc/vmstat in host is not the same as memory size specified in cmd | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Yanhui Ma <yama> |
| Component: | qemu-kvm-rhev | Assignee: | Luiz Capitulino <lcapitulino> |
| Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.2 | CC: | hhuang, juzhang, mazhang, mdeng, michen, virt-maint, xfu, ypu, yuhuang |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-09-24 18:01:09 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
Yanhui Ma
2015-04-15 08:47:49 UTC
This is not a bug. nr_mlock changing dynamically is OK because it also accounts for QEMU's stack and dynamic allocated memory, which grows and shrinks all the time. Also, it accounts for other processes as well that may be created/destroyed while you run the test. If you're checking nr_mlock as part of a test-case verification, you have to check for the minimum value it should have. This minimum value (if discarding QEMU's own memory, which will change overtime) is: (guest-memory * 1024 * 1024) / 4096 In your case this gives 393216, which looks correct. I've also tested this with latest kernel and qemu-kvm-rhev, and it works as expected. PS: While testing this I found out that hugetlb pages are not accounted for, but we already have bug 1221443 for this. I'll add my findings there. |