[PATCH 0/5] docs: misc docs enhancements for statistic API

Nikolay Shirokovskiy (5): docs: fix typo in virsh.rst for balloon.major_fault include: clarify docs for hugetlb in virDomainMemoryStatTags docs: add missing balloon stats docs in domstats docs: add missing iothread stats docs in domstats src: add missing balloon stats docs docs/manpages/virsh.rst | 11 ++++++++++- include/libvirt/libvirt-domain.h | 4 ++-- src/libvirt-domain.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-) -- 1.8.3.1

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> --- docs/manpages/virsh.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 1a2cf09..6a1ae40 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2250,7 +2250,7 @@ When selecting the *--state* group the following fields are returned: * ``balloon.swap_in`` - the amount of data read from swap space (in KiB) * ``balloon.swap_out`` - the amount of memory written out to swap space (in KiB) -* ``balloon.major_fault`` - the number of page faults then disk IO +* ``balloon.major_fault`` - the number of page faults when disk IO was required * ``balloon.minor_fault`` - the number of other page faults * ``balloon.unused`` - the amount of memory left unused by the -- 1.8.3.1

The term number is used for other stats and even for hugetlb stats in virsh man page. The term number is also more clear. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> --- include/libvirt/libvirt-domain.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index f129e6a..8b9d9c1 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -637,13 +637,13 @@ typedef enum { VIR_DOMAIN_MEMORY_STAT_DISK_CACHES = 10, /* - * The amount of successful huge page allocations from inside the domain via + * The number of successful huge page allocations from inside the domain via * virtio balloon. */ VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGALLOC = 11, /* - * The amount of failed huge page allocations from inside the domain via + * The number of failed huge page allocations from inside the domain via * virtio balloon. */ VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGFAIL = 12, -- 1.8.3.1

On 7/21/20 10:07 AM, Nikolay Shirokovskiy wrote:
The term number is used for other stats and even for hugetlb stats in virsh man page. The term number is also more clear.
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> --- include/libvirt/libvirt-domain.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Missed the src/libvirt-domain.c docs. Michal

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> --- docs/manpages/virsh.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 6a1ae40..d9caef1 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2265,6 +2265,10 @@ When selecting the *--state* group the following fields are returned: (in seconds) * ``balloon.disk_caches`` - the amount of memory that can be reclaimed without additional I/O, typically disk (in KiB) +* ``hugetlb_pgalloc`` - the number of successful huge page allocations + from inside the domain via virtio balloon +* ``hugetlb_pgfail`` - the number of failed huge page allocations + from inside the domain via virtio balloon *--vcpu* returns: -- 1.8.3.1

On 21.07.2020 11:07, Nikolay Shirokovskiy wrote:
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> --- docs/manpages/virsh.rst | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 6a1ae40..d9caef1 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2265,6 +2265,10 @@ When selecting the *--state* group the following fields are returned: (in seconds) * ``balloon.disk_caches`` - the amount of memory that can be reclaimed without additional I/O, typically disk (in KiB) +* ``hugetlb_pgalloc`` - the number of successful huge page allocations + from inside the domain via virtio balloon +* ``hugetlb_pgfail`` - the number of failed huge page allocations + from inside the domain via virtio balloon
In case someone will decide to push it - I missed balloon prefix here. Nikolay
*--vcpu* returns:

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> --- docs/manpages/virsh.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index d9caef1..ed7cefc 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2374,6 +2374,11 @@ too high will consume too much CPU time per IOThread failing to allow other threads running on the CPU to get time. The polling interval is not available for statistical purposes. +* ``iothread.count`` - maximum number of IOThreads in the subsequent list + as unsigned int. Each IOThread in the list will + will use it's iothread_id value as the <id>. There + may be fewer <id> entries than the iothread.count + value if the polling values are not supported. * ``iothread.<id>.poll-max-ns`` - maximum polling time in nanoseconds used by the <id> IOThread. A value of 0 (zero) indicates polling is disabled. * ``iothread.<id>.poll-grow`` - polling time grow value. A value of 0 (zero) -- 1.8.3.1

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> --- src/libvirt-domain.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index fe4dab7..36fa8a2 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -11455,6 +11455,34 @@ virConnectGetDomainCapabilities(virConnectPtr conn, * as unsigned long long. * "balloon.maximum" - the maximum memory in kiB allowed * as unsigned long long. + * "balloon.swap_in" - the amount of data read from swap space (in KiB) + * as unsigned long long + * "balloon.swap_out" - the amount of memory written out to swap space + * (in KiB) as unsigned long long + * "balloon.major_fault" - the number of page faults when disk IO was + * required as unsigned long long + * "balloon.minor_fault" - the number of other page faults + * as unsigned long long + * "balloon.unused" - the amount of memory left unused by the system + * (in KiB) as unsigned long long + * "balloon.available" - the amount of usable memory as seen by the domain + * (in KiB) as unsigned long long + * "balloon.rss" - Resident Set Size of running domain's process + * (in KiB) as unsigned long long + * "balloon.usable" - the amount of memory which can be reclaimed by balloon + * without causing host swapping (in KiB) + * as unsigned long long + * "balloon.last-update" - timestamp of the last update of statistics + * (in seconds) as unsigned long long + * "balloon.disk_caches" - the amount of memory that can be reclaimed + * without additional I/O, typically disk (in KiB) + * as unsigned long long + * "hugetlb_pgalloc" - the number of successful huge page allocations + * from inside the domain via virtio balloon + * as unsigned long long + * "hugetlb_pgfail" - the number of failed huge page allocations + * from inside the domain via virtio balloon + * as unsigned long long * * VIR_DOMAIN_STATS_VCPU: * Return virtual CPU statistics. -- 1.8.3.1

On 7/21/20 10:07 AM, Nikolay Shirokovskiy wrote:
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> --- src/libvirt-domain.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index fe4dab7..36fa8a2 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -11455,6 +11455,34 @@ virConnectGetDomainCapabilities(virConnectPtr conn, * as unsigned long long. * "balloon.maximum" - the maximum memory in kiB allowed * as unsigned long long. + * "balloon.swap_in" - the amount of data read from swap space (in KiB) + * as unsigned long long + * "balloon.swap_out" - the amount of memory written out to swap space + * (in KiB) as unsigned long long + * "balloon.major_fault" - the number of page faults when disk IO was + * required as unsigned long long + * "balloon.minor_fault" - the number of other page faults + * as unsigned long long + * "balloon.unused" - the amount of memory left unused by the system + * (in KiB) as unsigned long long + * "balloon.available" - the amount of usable memory as seen by the domain + * (in KiB) as unsigned long long + * "balloon.rss" - Resident Set Size of running domain's process + * (in KiB) as unsigned long long + * "balloon.usable" - the amount of memory which can be reclaimed by balloon + * without causing host swapping (in KiB) + * as unsigned long long + * "balloon.last-update" - timestamp of the last update of statistics + * (in seconds) as unsigned long long + * "balloon.disk_caches" - the amount of memory that can be reclaimed + * without additional I/O, typically disk (in KiB) + * as unsigned long long + * "hugetlb_pgalloc" - the number of successful huge page allocations + * from inside the domain via virtio balloon + * as unsigned long long + * "hugetlb_pgfail" - the number of failed huge page allocations + * from inside the domain via virtio balloon + * as unsigned long long
These last two ^^ are also missing the balloon prefix. Michal

On 7/21/20 10:07 AM, Nikolay Shirokovskiy wrote:
Nikolay Shirokovskiy (5): docs: fix typo in virsh.rst for balloon.major_fault include: clarify docs for hugetlb in virDomainMemoryStatTags docs: add missing balloon stats docs in domstats docs: add missing iothread stats docs in domstats src: add missing balloon stats docs
docs/manpages/virsh.rst | 11 ++++++++++- include/libvirt/libvirt-domain.h | 4 ++-- src/libvirt-domain.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> and pushed. Docs changes are safe for freeze. Michal
participants (2)
-
Michal Privoznik
-
Nikolay Shirokovskiy