From 29fca3994bbb32ae0e324b6ea7a431f6cb06d0dd Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Wed, 27 Jul 2016 15:28:55 +0200 Subject: [PATCH] qemu: fix domain memory 'usable' stat This fixes commit 65bf0446 which introduced 'usable' stat. Signed-off-by: Derbyshev Dmitry Signed-off-by: Pavel Hrdina --- include/libvirt/libvirt-domain.h | 2 +- src/libvirt-domain.c | 2 +- tools/virsh.pod | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index e0e3739b08..59a05b9b2d 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -604,7 +604,7 @@ typedef enum { VIR_DOMAIN_MEMORY_STAT_RSS = 7, /* - * How big the balloon can be inflated without pushing the guest system + * How much the balloon can be inflated without pushing the guest system * to swap, corresponds to 'Available' in /proc/meminfo */ VIR_DOMAIN_MEMORY_STAT_USABLE = 8, diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 413f8af5a4..4f083494e1 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -5987,7 +5987,7 @@ virDomainGetInterfaceParameters(virDomainPtr domain, * VIR_DOMAIN_MEMORY_STAT_AVAILABLE: * The total amount of memory available to the domain's OS (in kb). * VIR_DOMAIN_MEMORY_STAT_USABLE: - * How big the balloon can be inflated without pushing the guest system + * How much the balloon can be inflated without pushing the guest system * to swap, corresponds to 'Available' in /proc/meminfo * VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON: * Current balloon value (in kb). diff --git a/tools/virsh.pod b/tools/virsh.pod index 770ca49fab..9a2390563a 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -819,6 +819,8 @@ B: available - The amount of usable memory as seen by the domain (in kB) actual - Current balloon value (in KB) rss - Resident Set Size of the running domain's process (in kB) + usable - The amount of memory which can be reclaimed by balloon +without causing host swapping (in KB) For QEMU/KVM with a memory balloon, setting the optional I<--period> to a value larger than 0 in seconds will allow the balloon driver to return