mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Add entry for balloon stats stat-htlb-pgalloc and stat-htlb-pgfail
Qemu added reporting of virtio balloon new statistics stat-htlb-pgalloc and stat-htlb-pgfail since qemu-3.0 commit b7b12644297. The value of stat-htlb-pgalloc represents the number of successful hugetlb page allocations while stat-htlb-pgfail represents the number of failed ones. Add this statistics reporting to libvirt. To enable this feature for vm, guest kenel >= 4.17 is required because the exporting hugetlb page allocation for virtio balloon is introduced since 6c64fe7f. Signed-off-by: Han Han <hhan@redhat.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
committed by
Michal Privoznik
parent
dfd70ca1eb
commit
a699b19f6c
@@ -376,6 +376,10 @@ cmdDomMemStat(vshControl *ctl, const vshCmd *cmd)
|
||||
vshPrint(ctl, "last_update %llu\n", stats[i].val);
|
||||
if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_DISK_CACHES)
|
||||
vshPrint(ctl, "disk_caches %llu\n", stats[i].val);
|
||||
if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGALLOC)
|
||||
vshPrint(ctl, "hugetlb_pgalloc %llu\n", stats[i].val);
|
||||
if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGFAIL)
|
||||
vshPrint(ctl, "hugetlb_pgfail %llu\n", stats[i].val);
|
||||
}
|
||||
|
||||
ret = true;
|
||||
|
||||
Reference in New Issue
Block a user