[libvirt] [PATCH 08/10] Only call SetMemoryStatsPeriod for virtio memballoon
John Ferlan
jferlan at redhat.com
Fri Jun 5 11:58:25 UTC 2015
On 06/04/2015 09:58 AM, Ján Tomko wrote:
> ---
> src/qemu/qemu_process.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 7f154f0..64ee049 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -5517,7 +5517,9 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
> if (running) {
> virDomainObjSetState(vm, VIR_DOMAIN_RUNNING,
> VIR_DOMAIN_RUNNING_UNPAUSED);
> - if (vm->def->memballoon && vm->def->memballoon->period) {
> + if (vm->def->memballoon &&
> + vm->def->memballoon->model == VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO &&
> + vm->def->memballoon->period) {
Setting a period == 0 means to disable collection IIRC... yep, true from
the man page...
ACK if you remove the vm->def->memballoon->period condition
John
> qemuDomainObjEnterMonitor(driver, vm);
> qemuMonitorSetMemoryStatsPeriod(priv->mon,
> vm->def->memballoon->period);
>
More information about the libvir-list
mailing list