From: Hyman Huang(黄勇) <huangy81@xxxxxxxxxxxxxxx> Since the Dirty Ring on QEMU part has been merged recently, how to use this feature is under consideration. In the scene of migration, it is valuable to provide a more accurante interface to track dirty memory than existing one, so that the upper layer application can make a wise decision, or whatever. More importantly, dirtyrate info at the granualrity of vcpu could provide a possibility to make migration convergent by imposing restriction on vcpu. With Dirty Ring, we can calculate dirtyrate efficiently and cheaply. The old interface implemented by sampling pages, it consumes cpu resource, and the larger guest memory size become, the more cpu resource it consumes, namely, hard to scale. New interface has no such drawback. Please review, thanks ! Best Regards ! Hyman Huang(黄勇) (6): KVM: add kvm_dirty_ring_enabled function KVM: introduce dirty_pages into CPUState migration/dirtyrate: add vcpu option for qmp calc-dirty-rate migration/dirtyrate: adjust struct DirtyRateStat migration/dirtyrate: check support of calculation for vcpu migration/dirtyrate: implement dirty-ring dirtyrate calculation accel/kvm/kvm-all.c | 11 +++ include/hw/core/cpu.h | 2 + include/sysemu/kvm.h | 1 + migration/dirtyrate.c | 179 +++++++++++++++++++++++++++++++++++++---- migration/dirtyrate.h | 19 ++++- migration/trace-events | 1 + qapi/migration.json | 28 ++++++- 7 files changed, 222 insertions(+), 19 deletions(-) -- 2.24.3