Bug 802680

Summary: virtio balloon extended memory statistics are not supported
Product: [Fedora] Fedora Reporter: Renich Bon Ciric <renich>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 16CC: amit.shah, berrange, cfergeau, crobinso, dwmw2, ehabkost, gansalmon, gcosta, itamar, jaswinder, jforbes, jonathan, juzhang, knoel, lihuang, madhu.chinakonda, scottt.tw, tburke, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 601690 Environment:
Last Closed: 2012-07-10 07:37:07 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 601690    
Bug Blocks:    

Description Renich Bon Ciric 2012-03-13 05:36:28 EDT
+++ This bug was initially created as a clone of Bug #601690 +++

Description of problem:
KVM and libvirt in RHEL6 have support for querying extended memory statistics from the guest kernel balloon driver. The RHEL6 kernel, however, is missing this since IIRC it was only added in 2.6.34. This is causing frequent bug reports from beta testers expecting extended statistics to be present in RHEL6 and is also useful information for host admins. The code is well isolated from the rest of the kernel, so it should be feasible to backport this.


Version-Release number of selected component (if applicable):
kernel-2.6.32-33.el6
libvirt-0.8.1-7.el6.x86_64
qemu-kvm-0.12.1.2-2.50.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Boot a RHEL6 KVM guest
2. Run 'virsh dommemstat $GUESTNAME' on the host
3.
  
Actual results:
No output

Expected results:
Similar output to

# virsh dommemstat f14x86_64
swap_in 0
swap_out 0
major_fault 1421
minor_fault 5607546
unused 26672
available 794344



Additional info:
There appear to be at least 3 upstream patches required to provide this support in the kernel virtio balloon driver.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9564e138b1f6eb137f7149772438d3f3fb3277dd
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1f34c71afe5115e77a49c4e67720a66e27053e54
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=169c246a30808588436794e96a97c61a01af9bed

--- Additional comment from pm-rhel@redhat.com on 2010-06-08 09:58:37 EDT ---

This feature request did not get resolved in time for Feature Freeze
for the current Red Hat Enterprise Linux release and has now been
denied. It has been proposed for the next Red Hat Enterprise Linux
release. If you would still like it considered for the current
release as an exception, please make that request with your support
representative.

--- Additional comment from pm-rhel@redhat.com on 2010-06-08 13:53:21 EDT ---

This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

--- Additional comment from arozansk@redhat.com on 2010-07-01 12:21:39 EDT ---

Patch(es) available on kernel-2.6.32-42.el6

--- Additional comment from lihuang@redhat.com on 2010-08-01 12:18:30 EDT ---

verified on kernel-2.6.32-52.el6

1. on guest : 
[root@dhcp-91-115 ~]# free 
             total       used       free     shared    buffers     cached
Mem:        851084     338288     512796          0      78412     105640
-/+ buffers/cache:     154236     696848
Swap:      6258680          0    6258680

2. on host 
virsh # dommemstat 17
swap_in 0
swap_out 0
major_fault 781
minor_fault 1815889
unused 512812
available 851084

3. on host 
virsh # setmem 17 4096000

4. on host 
virsh # dommemstat 17
swap_in 0
swap_out 0
major_fault 781
minor_fault 1827031
unused 3584788
available 3923084

5. on guest 
[root@dhcp-91-115 ~]# free 
             total       used       free     shared    buffers     cached
Mem:       3923084     338304    3584780          0      78412     105640
-/+ buffers/cache:     154252    3768832
Swap:      6258680          0    6258680

--- Additional comment from releng-rhel@redhat.com on 2010-11-11 11:10:12 EST ---

Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.
Comment 1 Renich Bon Ciric 2012-03-13 05:37:57 EDT
Here's my sample output:

# virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # dommemstat f17
actual 2097152

This was tested on F16 x86_64 (fully updated)
Comment 2 Josh Boyer 2012-03-13 10:07:14 EDT
As far as I know, the kernel has all of the support necessary for this.  The commits highlighted in the original bug have long been in the upstream kernel.

I believe this should be reported against qemu, as it seems to have disabled the guest-provided stats.  It seems there is some kind of long standing problem with them and they haven't solved it yet.
Comment 3 Amit Shah 2012-03-13 10:36:55 EDT
(In reply to comment #2)
> As far as I know, the kernel has all of the support necessary for this.  The
> commits highlighted in the original bug have long been in the upstream kernel.

Right.

QEMU upstream still lacks some infrastructure that will allow guests to send such stats asynchronously to qemu.  Work is in progress, but it's more likely that this will be available in the timeframe for Fedora 18.  F16 may never get this functionality.
Comment 4 Renich Bon Ciric 2012-03-13 18:34:51 EDT
Ok, so; leave this open until then or mark it as WONTFIX ?
Comment 5 Fedora Admin XMLRPC Client 2012-03-15 13:57:24 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 6 Cole Robinson 2012-07-10 07:37:07 EDT
Marking as WONTFIX for F16 per comment #3