Bug 767921
Summary: | Results are different when testing memtune for twice with the same parameters | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Min Zhan <mzhan> | |
Component: | libvirt | Assignee: | Martin Kletzander <mkletzan> | |
Status: | CLOSED DUPLICATE | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | medium | Docs Contact: | ||
Priority: | low | |||
Version: | 6.3 | CC: | acathrow, bili, dallan, dyuan, mzhan, rwu, yupzhang | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 826880 (view as bug list) | Environment: | ||
Last Closed: | 2012-07-23 13:42:56 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 826880 |
Description
Min Zhan
2011-12-15 09:08:37 UTC
Has same result as the description in the versions: qemu-kvm-0.12.1.2-2.248.el6.x86_64 libvirt-0.9.10-6.el6.x86_64 kernel-2.6.32-251.el6.x86_64 I was able to reproduce the bug on latest libvirt and qemu with 3.4.0 kernel. According to the logs, however, libvirt is doing everything correctly. Researching a little bit more, I came to a point where I am able to reproduce this bug *without* libvirt, causing the same error messages to appear from kernel. There is a workaround for this problem, but it doesn't seem right, because I've found out no information about it. Let me explain. This is how to reproduce the bug without libvirt (numbers are taken from libvirt log after reproducing this according to the comment #1, so multiplied by 1024): 1) Start by creating a group for the actual process: # mkdir /sys/fs/cgroup/memory/test # echo $$ >/sys/fs/cgroup/memory/test/tasks 2) Set the first round of parameters: # echo 105472000001024 > /sys/fs/cgroup/memory/test/memory.limit_in_bytes # echo 105472000001024 > /sys/fs/cgroup/memory/test/memory.soft_limit_in_bytes # echo 105472000001024 > /sys/fs/cgroup/memory/test/memory.memsw.limit_in_bytes 3) Set the second round of parameters: # echo 105574400001024 > /sys/fs/cgroup/memory/test/memory.soft_limit_in_bytes # echo 105574400001024 > /sys/fs/cgroup/memory/test/memory.limit_in_bytes -su: echo: write error: Invalid argument # echo 105574400001024 > /sys/fs/cgroup/memory/test/memory.memsw.limit_in_bytes 4) Try the second round again: # echo 105574400001024 > /sys/fs/cgroup/memory/test/memory.soft_limit_in_bytes # echo 105574400001024 > /sys/fs/cgroup/memory/test/memory.limit_in_bytes # echo 105574400001024 > /sys/fs/cgroup/memory/test/memory.memsw.limit_in_bytes Note that the second command from point 3) will fail until the memsw limit is greater or equal to the number we want to set. The workaround would then be, to set the memsw first and continue with the others. The problem is that this is mentioned nowhere in the documentation and thus it looks like a bug. Having memsw lower than the hard limit on memory is, of course, nonsense. But if this is a valid restriction, it should be mentioned in the documentation. If this is a bug, then it should be fixed (not having these restrictions would ease the setting from scripts and programs, because now there needs to be bunch of checks before the setting). I'll clone this bug for kernel, to make this resolved asap. *** Bug 829241 has been marked as a duplicate of this bug. *** *** This bug has been marked as a duplicate of bug 839537 *** |