=Comment: #0================================================= Emily J. Ratliff <ratliff.com> - 1. Feature Overview: Feature Id: [202025] a. Name of Feature: Provide balloon driver for KVM guests b. Feature Description Provide balloon driver for all supported GuestOSs , certainly any ones that have VirtIO drivers. (RHEL5.4 as first priority) While KSM is good in many situations, when one needs to influence significant reduction in GuestOS mem usage, say forcing from 4GB to 512M, etc, ballooning is the way to go. While some autonomic mechanism , or sophisticated Guest/Host communicaiton mechanism method will eventually be desirable, basic libvirt control is sufficient, until we all know more.. 2. Feature Details: Sponsor: Xen Architectures: x86 x86_64 Arch Specificity: Purely Arch Specific Code Affects Kernel Modules: Yes Delivery Mechanism: Request Red Hat development assistance Category: Device Drivers and IO Request Type: Driver - New from Upstream d. Upstream Acceptance: Accepted Sponsor Priority 1 f. Severity: High IBM Confidential: no Code Contribution: no g. Component Version Target: 3. Business Case Need to have more flexible control of memory utilization in virtualized environment, especially in cloud deployments. While KSM affords an approach for minimizing memory utilization, there are times where more immediate and proactive methods are needed. The balloon driver affords another suhc needed mechanism . 4. Primary contact at Red Hat: John Jarvis jjarvis 5. Primary contacts at Partner: Project Management Contact: Stephanie Glass, sglass.com Technical contact(s): Frank Novak, fnovak.com Anthony Liguori, aliguor.com IBM Manager: Warren Grunbok II, grunbok.com
Created attachment 361714 [details] virtio balloon driver for RHEL5.4 kernel ------- Comment on attachment From hollisb.com 2009-09-18 15:29 EDT------- This patch backports the virtio balloon driver from 2.6.31. I have rebuilt and installed the RHEL5.4 kernel package with it applied (and the .config addition), loaded it in a RHEL 5.4 guest, and it works as expected. However, the driver doesn't auto-load, which is true of all virtio drivers in RHEL 5.4. I understand Red Hat has added custom init script logic to load other virtio modules in RHEL 5.4 guests, so that logic would need to cover the virtio balloon PCI device too. For the record, the PCI ID is 1af4:1002.
This enhancement request was evaluated by the full Red Hat Enterprise Linux team for inclusion in a Red Hat Enterprise Linux minor release. As a result of this evaluation, Red Hat has tentatively approved inclusion of this feature in the next Red Hat Enterprise Linux Update minor release. While it is a goal to include this enhancement in the next minor release of Red Hat Enterprise Linux, the enhancement is not yet committed for inclusion in the next minor release pending the next phase of actual code integration and successful Red Hat and partner testing.
I reposted this patch to RKML because it was sitting out there for several weeks with only one ACK and no other feedback. http://post-office.corp.redhat.com/archives/rhkernel-list/2009-November/msg00395.html Peter
in kernel-2.6.18-175.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5 Please do NOT transition this bugzilla state to VERIFIED until our QE team has sent specific instructions indicating when to do so. However feel free to provide a comment indicating that this fix has been verified.
------- Comment From sglass.com 2009-12-14 08:31 EDT------- In RH cvs tree moving to Acceped state
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: Previous versions of RHEL5 didn't include the virtio balloon driver. The driver was unavailable to users attempting to balloon the memory allocation to KVM guests Consequence: If a user attempts to balloon a KVM guest that is running RHEL5.4, KVM will report that ballooning is not activated in the guest. Fix: Provide backport virtio balloon driver for RHEL5.5 and enable the driver as a kernel module. Result: If a user attempts to balloon a KVM guest that is running RHEL5.5, the balloon command will successfully allow a user to change the memory assignment of the guest.
------- Comment From agl.com 2010-02-11 12:31 EDT------- While testing the beta drop from 02/01/2010 I discovered the following: 1. The virtio_balloon kernel module is not automatically loaded. Therefore, RHEL5.5 guests will not respond to balloon requests from the host by default. 2. If I manually loaded virtio_balloon in the RHEL5.5 guest, I was able to balloon the guest by issuing 'virsh setmem' commands from the host. This feature is not complete until the virtio_balloon kernel module is automatically loaded.
In response to an email where I asked Adam Litky, agl.com, how he would like the virtio_balloon driver automatically loaded, Adam Litke wrote: On my test system, the virtio and virtio_pci modules were loaded (presumably because virtio_pci has a legitimate device ID). So, I think the correct solution is to always load virtio_balloon whenever virtio is loaded. Maybe something like the following (in modprobe.conf syntax): install virtio /sbin/modprobe --first-time --ignore-install virtio && { /sbin/modprobe virtio_balloon; /bin/true; } This is just a guess and should be reviewed for correctness. Is modprobe.conf the Red Hat way do accomplish this?
The problem here is that the virtio module id infrastructure was not back ported to the 2.6.18 kernel requiring virtio modules to be explicitly loaded. I believe that for virtio-blk and virtio-net, these modules are loaded by the initrd. We should attempt to confirm this and do the same thing for virtio-balloon that is done for the other virtio drivers.
------- Comment From agl.com 2010-02-11 16:50 EDT------- Added a link to bug 60704 which blocks this feature. The virtio_balloon kernel module is not being loaded.
I'm seeing in a test that virtio-blk has a modalias of virtio:d00000002v*, and the devices in /sys/devices/virtio-pci have modalias files.
------- Comment From tpnoonan.com 2010-02-11 18:11 EDT------- defect rit is 60704 - RIT 511523 Virtio Balloon driver is not loaded by default in RHEL-5.5 guests
------- Comment From tpnoonan.com 2010-02-17 11:06 EDT------- per 2/16 e-mail from red hat: 56094 - [LTC 5.5 FEAT] Provide balloon driver for KVM guests [202025] Red Hat Bugzilla 522629 -feature verifies once manually loaded but req. is for auto load and not usable without auto load -opening defect bz -suspect virtio balloon driver needs to be added to initrd as virtio block, virtio net already are Approved for snapshot 3
------- Comment From aliguori.com 2010-03-08 11:40 EDT------- This was verified in snap3 as reported in #60704
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-2010-0178.html