[pve-devel] balloon bug in qemu 2.1 ?

Alexandre DERUMIER aderumier at odiso.com
Fri Mar 6 05:42:57 CET 2015


@Dietmar: 

As far I remember, we have make the virtio-balloon-fix-query.patch patch,
because at this time, it was impossible to use qom guest-stats to retrieve all values in 1 call
(And we wanted to avoid to call 5-6 times qom guest-stats)


Now,it seem that we can get all values directly.  (excluding actual-max_mem).


Maybe it's time to remove this patch, and use qemu qom implementation ?


----- Mail original -----
De: "aderumier" <aderumier at odiso.com>
À: "datanom.net" <mir at datanom.net>, "dietmar" <dietmar at proxmox.com>
Cc: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Vendredi 6 Mars 2015 05:26:58
Objet: Re: [pve-devel] balloon bug in qemu 2.1 ?

Seem to be a proxmox bug finally (or maybe proxmox use a path not used anymore by qemu), 

using qom balloon guest-stats (with the guest is started with -machine ..) 



my $stats = vm_mon_cmd_nocheck($vmid, 'qom-get', 
path => "machine/peripheral/balloon0", 
property => "guest-stats"); 


$VAR1 = { 'last-update' => 1425614800, 'stats' => { 'stat-free-memory' => 993222656, 'stat-swap-in' => 0, 'stat-total-memory' => 1051348992, 'stat-major-faults' => 210, 'stat-minor-faults' => 516044, 'stat-swap-out' => 0 } }; 


$VAR1 = { 'last-update' => 1425614814, 'stats' => { 'stat-free-memory' => 993222656, 'stat-swap-in' => 0, 'stat-total-memory' => 1051348992, 'stat-major-faults' => 210, 'stat-minor-faults' => 516044, 'stat-swap-out' => 0 } }; 


$VAR1 = { 'last-update' => 1425614840, 'stats' => { 'stat-free-memory' => 993222656, 'stat-swap-in' => 0, 'stat-total-memory' => 1051348992, 'stat-major-faults' => 210, 'stat-minor-faults' => 516044, 'stat-swap-out' => 0 } }; 

$VAR1 = { 'last-update' => 1425614932, 'stats' => { 'stat-free-memory' => 993222656, 'stat-swap-in' => 0, 'stat-total-memory' => 1051348992, 'stat-major-faults' => 210, 'stat-minor-faults' => 516044, 'stat-swap-out' => 0 } }; 



# info balloon 
balloon: actual=4096 max_mem=4096 

# info balloon 
balloon: actual=4096 max_mem=4096 

# info balloon 
balloon: actual=4096 max_mem=4096 

----- Mail original ----- 
De: "aderumier" <aderumier at odiso.com> 
À: "datanom.net" <mir at datanom.net> 
Cc: "pve-devel" <pve-devel at pve.proxmox.com> 
Envoyé: Jeudi 5 Mars 2015 20:15:15 
Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? 

maybe this commit 
http://git.qemu.org/?p=qemu.git;a=commit;h=91ba21208839643603e7f7fa5864723c3f371ebe 
http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg05176.html 

virtio-balloon: fix virtio-balloon child refcount in transports 

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c 
index 40652a7..62f84c4 100644 (file) 
--- a/hw/virtio/virtio-pci.c 
+++ b/hw/virtio/virtio-pci.c 
@@ -1325,7 +1325,7 @@ static void virtio_balloon_pci_instance_init(Object *obj) 
VirtIOBalloonPCI *dev = VIRTIO_BALLOON_PCI(obj); 
object_initialize(&dev->vdev, sizeof(dev->vdev), TYPE_VIRTIO_BALLOON); 
object_property_add_child(obj, "virtio-backend", OBJECT(&dev->vdev), NULL); 
- 
+ object_unref(OBJECT(&dev->vdev)); 
object_property_add(obj, "guest-stats", "guest statistics", 
balloon_pci_stats_get_all, NULL, NULL, dev, 
NULL); 



It's has been applied in qemu 2.1.3 , I'll do test with qemu 2.1.2. 



----- Mail original ----- 
De: "aderumier" <aderumier at odiso.com> 
À: "datanom.net" <mir at datanom.net> 
Cc: "pve-devel" <pve-devel at pve.proxmox.com> 
Envoyé: Jeudi 5 Mars 2015 18:14:53 
Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? 

Thanks Michael 

That's seem to confirm that the problem come from the "-machine " option. 

I'm currently digging inside qemu code to find what does it change. 

----- Mail original ----- 
De: "datanom.net" <mir at datanom.net> 
À: "pve-devel" <pve-devel at pve.proxmox.com> 
Envoyé: Jeudi 5 Mars 2015 17:30:00 
Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? 

On Thu, 5 Mar 2015 16:44:05 +0100 (CET) 
Alexandre DERUMIER <aderumier at odiso.com> wrote: 

> Note that balloon itself is working 
> 
> # info balloon 
> balloon: actual=1024 max_mem=1024 
> 
> # balloon 512 
> 
> # info balloon 
> balloon: actual=512 max_mem=1024 
> 
> 
Before migration: 
# info version 
2.1.3 

# info balloon 
balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=75 
mem_swapped_in=165457920 mem_swapped_out=401846272 
major_page_faults=29400 minor_page_faults=231808189 
last_update=1425572879 

After migration 
# info balloon 
balloon: actual=1024 max_mem=1024 

You you stop and start then VM balloon works again. 

-- 
Hilsen/Regards 
Michael Rasmussen 

Get my public GnuPG keys: 
michael <at> rasmussen <dot> cc 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E 
mir <at> datanom <dot> net 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C 
mir <at> miras <dot> org 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917 
-------------------------------------------------------------- 
/usr/games/fortune -es says: 
May you have many handsome and obedient sons. 

_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 

_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 
_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 
_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list