>>That's kernel work, qemu is merely reporting what the kernel is making >>available. But giving that you'll touch the kernel anyway, it's better >>to add a new stat. >> >>There are two other alternatives: >> >>1. add a query-memory-stats command to qemu-ga >> >>Pros: should be quicker and easier to modify/extend >>Cons: has the implications of running this from the guest user-space
Hello, I would like also extend balloon stats to retrieve guest buffer memory, It can help a lot for doing accurate balloning. Using qemu-ga is easy for linux (we can read /proc/meminfo), but with windows guest is impossible currently. (we need to query wmi counter, and executing process is no possible with qga) Adding the new wmi counter ("System Cache Resident Bytes") is quite easy in windows balloon driver. Best Regards, Alexandre Derumier --- Mail original ----- De: "Luiz Capitulino" <lcapitul...@redhat.com> À: "Dietmar Maurer" <diet...@proxmox.com> Cc: aligu...@us.ibm.com, a...@us.ibm.com, qemu-devel@nongnu.org, mdr...@linux.vnet.ibm.com Envoyé: Vendredi 7 Décembre 2012 19:54:44 Objet: Re: [Qemu-devel] [RFC 3/3] docs: document virtio-balloon stats On Fri, 7 Dec 2012 15:01:36 +0000 Dietmar Maurer <diet...@proxmox.com> wrote: > > > Is it possible to extent those statistic to include buffer/cache values? > > > > Yes, should be possible but the kernel virtio-balloon driver has to be > > extended too (and I suspect this kind of change goes into the kernel first). > > The current statistics are quite useless without that information, and Maybe it's not possible to implement the feature you want to implement, but I do get a ping once a while from people asking for these stats. Some of them are people running virsh dommemstat which also makes use of that information. > I guess it is impossible to such changes upstream within a reasonable time? In the kernel, yes it would take a while. > So what is the purpose of that 'stat-free-memory'? Can we change that to > return the amount of free RAM including buffers? That's kernel work, qemu is merely reporting what the kernel is making available. But giving that you'll touch the kernel anyway, it's better to add a new stat. There are two other alternatives: 1. add a query-memory-stats command to qemu-ga Pros: should be quicker and easier to modify/extend Cons: has the implications of running this from the guest user-space 2. wait for the (kernel-based) auto-ballooning feature, which is on the works Pros: you do nothing and it's going to be completely automatic Cons: this is unlikely to be ready for the short term