Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 714855

Summary: Failed to update memory info of "xm list -l" when memory resizing within PV guest
Product: Red Hat Enterprise Linux 5 Reporter: Yuyu Zhou <yuzhou>
Component: xenAssignee: Miroslav Rezanina <mrezanin>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 5.7CC: leiwang, mrezanin, qwan, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: xen-3.0.3-133.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 05:55:22 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 Yuyu Zhou 2011-06-21 05:28:33 UTC
Description of problem:
After memory resizing within PV guest via balloon, the "xm list -l" still shows the memory size before balloon

Version-Release number of selected component (if applicable):
xen-3.0.3-132.el5
rhel5 PV guest

How reproducible:
100%

Steps to Reproduce:

1. Start a RHEL5 PV guest, and read from /proc/xen/balloon in guest.
[guest]# cat /proc/xen/balloon
current allocation:  1048576 kB
Requested target:    1048576 kB
Low-mem balloon:        8192 kB
High-mem balloon:          0 kB
Driver pages:              0 kB
Xen hard limit:          ??? kB

2.Lower memory size of PV guest via balloon. In the guest:
[guest]# echo 512M > /proc/xen/balloon
[guest]# cat /proc/xen/balloon
Current allocation:   524288 kB
Requested target:     524288 kB
Low-mem balloon:      532480 kB
High-mem balloon:          0 kB
Driver pages:              0 kB
Xen hard limit:          ??? kB
[guest]# free -m
             total       used       free     shared    buffers     cached
Mem:           512        322        189          0         15        161
-/+ buffers/cache:        145        366
Swap:          588          0        588

3. Check memory size of PV guest externally.
[host]# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0     3779     4 r-----   1924.2
RHEL5.7-64-PV                             47      512     4 -b----     11.3
[host]# xm list -l 47| grep mem
    (memory 1024)
    (shadow_memory 0)
    (maxmem 1024)

  
Actual results:
The memory info from "xm list -l" still remains 1024

Expected results:
The memory info from "xm list -l" should change to 512.

Additional info:
Also can be reproduced on xen-3.0.3-120.el5
The guest mem-set from Domain0 works well.

Comment 1 Miroslav Rezanina 2011-06-21 06:31:21 UTC
Problem is that xm list -l does not update memory field to current value as short version do.

Comment 6 Qixiang Wan 2011-12-05 06:59:48 UTC
Verified with xen-3.0.3-135.el5. After the fix, 'xm list -l' can show correct changed memory value.

Steps:
1. Boot up a RHEL5u7 i386 PV guest with memory=1024 and maxmem=1024
2. Balloon down memory within the guest.
   # echo 512M > /proc/xen/balloon
3. Check guest memory in Dom0.
   # rpm -q xen
   xen-3.0.3-135.el5
   # xm list rhel
   Name                                      ID Mem(MiB) VCPUs State   Time(s)
   rhel                                       2      512     1 -b----     16.1
   # xm list -l rhel | grep mem
      (memory 512)
      (shadow_memory 0)
      (maxmem 1024)

Comment 7 errata-xmlrpc 2012-02-21 05:55:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0160.html