Bug 613291
Summary: | guest did not honor cgroup memory.limit_in_bytes | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Qian Cai <qcai> |
Component: | kernel | Assignee: | Larry Woodman <lwoodman> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Kernel QE team <kernel-qe> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 6.0 | CC: | clalance, tburke |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-07-30 16:28:38 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: |
Description
Qian Cai
2010-07-10 14:15:28 UTC
You need to "echo $$ > tasks" just before running the program. Larry Larry, where to run that command? I setup the cgroup in the host, and then start the malloc program in the guest. As you can see that there was no cgroup configured in the guest. I have also tried to move all KVM PIDs into the cgroup without luck. OK, Larry and I just tried this out, and it seems to work like it should. There are a couple of things to note here: 1) It looks like you started the guest via libvirt. Did you? If so, libvirt automatically puts all guests into a cgroup under /cgroup/memory/libvirt/qemu/<guestname>. So one way you can run this test is to go into the pre-defined libvirt cgroup and limit the memory that way. We tested this, and it did the right thing. 2) If you do want to do something like in the original comment (i.e. make your own cgroup), you have to make sure that all of the threads from the qemu-kvm process get put into the new cgroup. We also tried this out, and this also worked for us. Chris L and Larry |