[PATCH v2 0/6] support mode option for dirtyrate calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hyman Huang(黄勇) <huangy81@xxxxxxxxxxxxxxx>

v2:
Rebase master and fix confilicts with commit
"Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_PREALLOC"

Thanks !

v1:
This patchset introduce mode option as the supplement of
qemuDomainStartDirtyRateCalc api, add calc_mode for dirtyrate 
statistics correspondingly.

Qemu add mode parameter for calc-dirty-rate command since >= 6.2.0,
either of these three mode "page-sampling, dirty-bitmap, dirty-ring"
can be specified when calculating dirty page rate.

Page sampling is the original mode and used as default mode. 

Dirty bitmap mode use kvm log sync api to fetch the dirty-bitmap
and count the increased 1 bits number during measurement, thus,
calculate the dirty page rate.

Dirty ring mode use the dirty-ring mechanism implemented in Qemu
which can count the increased dirty page on virtual cpu granularity,
thus, calculate the per-vcpu dirty page rate.

These three calculation mode can be used in different scenarios, and
the dirty-bitmap, dirty-ring mode may be more accurate to a certain
degree. So maybe it's time to support the mode option for dirtyrate
calculation.

This series make main modifications as the following:
1. introduce QEMU_CAPS_CALC_DIRTY_RATE capability to probe
   calc-dirty-rate command in case of failure since it just
   introduced since >= 5.2.0

2. introduce QEMU_CAPS_DIRTYRATE_MODE capability to probe
   mode option of calc-dirty-rate command in case of failure, same
   as 1.

3. implement mode option support for dirtyrate calculation. 

Please review, thanks !

Best Regards !

Hyman Huang(黄勇) (6):
  qemu_capabilities: Introduce QEMU_CAPS_CALC_DIRTY_RATE capability
  qemu_driver: Probe capability before calculating dirty page rate
  qemu_capabilities: Introduce QEMU_CAPS_DIRTYRATE_MODE capability
  qemu_driver: Add mode option for qemuDomainStartDirtyRateCalc
  virsh: Extend domdirtyrate-calc virsh api
  qemu_driver: Add calc_mode for dirtyrate statistics

 docs/manpages/virsh.rst                           |  7 +-
 include/libvirt/libvirt-domain.h                  | 13 ++++
 src/libvirt-domain.c                              | 17 ++++-
 src/qemu/qemu_capabilities.c                      |  4 ++
 src/qemu/qemu_capabilities.h                      |  2 +
 src/qemu/qemu_driver.c                            | 59 ++++++++++++++++-
 src/qemu/qemu_monitor.c                           |  5 +-
 src/qemu/qemu_monitor.h                           | 20 +++++-
 src/qemu/qemu_monitor_json.c                      | 78 +++++++++++++++++++++--
 src/qemu/qemu_monitor_json.h                      |  3 +-
 tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml |  1 +
 tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   |  1 +
 tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml |  1 +
 tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   |  1 +
 tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  |  1 +
 tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml |  1 +
 tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   |  1 +
 tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  |  1 +
 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  |  1 +
 tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml |  1 +
 tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   |  2 +
 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  |  2 +
 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   |  2 +
 tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  |  2 +
 tools/virsh-domain.c                              | 28 +++++++-
 25 files changed, 239 insertions(+), 15 deletions(-)

-- 
1.8.3.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux