Bug 507847

Summary: Balloon driver gives up too easily when ballooning up under memory pressure
Product: Red Hat Enterprise Linux 4 Reporter: Ian Campbell <ijc>
Component: kernel-xenAssignee: Andrew Jones <drjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 4.8CC: drjones, jzheng, mjenner, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 507846 Environment:
Last Closed: 2011-02-16 16:03:53 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: 458302    
Attachments:
Description Flags
linux-2.6.18-xen.hg 897:329ea0ccb344 ported to 2.6.9-89.EL
none
Orignally attached patch reported to current RHEL 4.9 kernel none

Description Ian Campbell 2009-06-24 14:03:44 UTC
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.

How reproducible:

Easily

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
  
Actual results:

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.

Expected results:

In step 5 the original domain will balloon up to the full 2G.

Additional info:

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.

Comment 1 Andrew Jones 2009-07-22 17:04:08 UTC
Created attachment 354740 [details]
Orignally attached patch reported to current RHEL 4.9 kernel

Comment 2 RHEL Program Management 2010-04-16 13:40:29 UTC
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
release.

Comment 3 Vivek Goyal 2010-10-14 14:40:49 UTC
Committed in 89.43.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/

Comment 7 Jinxin Zheng 2010-12-20 08:36:06 UTC
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.

Comment 8 errata-xmlrpc 2011-02-16 16:03:53 UTC
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.

http://rhn.redhat.com/errata/RHSA-2011-0263.html