Red Hat Bugzilla – Bug 507847
Balloon driver gives up too easily when ballooning up under memory pressure
Last modified: 2011-02-16 11:03:53 EST
Created attachment 349245 [details]
linux-2.6.18-xen.hg 897:329ea0ccb344 ported to 2.6.9-89.EL
The issue described in the parent bug also effects the RHEL 4x kernel, I tried 2.6.9-89.EL. I have attached a version of the upstream patch appropriate for that kernel.
+++ This bug was initially created as a clone of Bug #507846 +++
Created an attachment (id=349241)
linux-2.6.18-xen.hg 897:329ea0ccb344 ported to 2.6.18-128.1.10.el5
Description of problem:
We recently noticed that the standard Xen balloon driver for Linux will give up on ballooning if it encounters memory pressure. When this occurs ballooning will stop until the target is reset, regardless of how much memory subsequently becomes available
Version-Release number of selected component (if applicable):
2.6.18-128.1.10.el5 and all previous kernel releases.
Steps to Reproduce:
Depend somewhat on the amount of the host RAM available. The trick is to balloon a domain down and then create a guest which uses enough memory to cause the original to exhaust memory as it balloons back up.
1. Create a new domain with e.g. 2G RAM
2. Instruct domain to balloon to 1G RAM: xenstore-write /local/domain/<domid>/memory/target 1048576
3. Create a second domain which uses up enough RAM to leave <1G free.
4. Instruct the original domain to balloon back up to 2G: xenstore-write /local/domain/<domid>/memory/target 2097152
5. Shutdown domain 2
In step 4 the first domain will stop ballooning up somewhere between 1 and 2G, in step 5 it will remain at that same value.
In step 5 the original domain will balloon up to the full 2G.
This was fixed by the upstream changeset
http://xenbits.xensource.com/linux-2.6.18-xen.hg?cs=329ea0ccb344 I have attached a version ported to the 2.6.18-128.1.10.el5 kernel.
Created attachment 354740 [details]
Orignally attached patch reported to current RHEL 4.9 kernel
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Committed in 89.43.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/
I have verified this bug by the reproducer provided in the bug description:
1. create the RHEL4 guest with 2G RAM.
2. mem-set the guest to 1G.
3. create a second guest, leaving only about 500M free RAM.
4. mem-set the RHEL4 guest to 2G, at this step, the guest could only be ballooned to about 1500M.
5. shutdown the second guest.
with -89.EL kernel, step 5 leaves the guest with the same RAM value.
with -93.EL kernel ,step 5 gives the guest full 2G.
I've verified this both on i686 and x86_64.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.