migration/dirtyrate: implement dirty-bitmap dirtyrate calculation

introduce dirty-bitmap mode as the third method of calc-dirty-rate.
implement dirty-bitmap dirtyrate calculation, which can be used
to measuring dirtyrate in the absence of dirty-ring.

introduce "dirty_bitmap:-b" option in hmp calc_dirty_rate to
indicate dirty bitmap method should be used for calculation.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
Hyman Huang(黄勇)
2021-07-20 23:19:17 +08:00
committed by Juan Quintela
parent 4998a37e4b
commit 826b8bc80c
3 changed files with 112 additions and 15 deletions

View File

@ -1737,9 +1737,10 @@ ERST
{
.name = "calc_dirty_rate",
.args_type = "dirty_ring:-r,second:l,sample_pages_per_GB:l?",
.params = "[-r] second [sample_pages_per_GB]",
.help = "start a round of guest dirty rate measurement (using -d to"
"\n\t\t\t specify dirty ring as the method of calculation)",
.args_type = "dirty_ring:-r,dirty_bitmap:-b,second:l,sample_pages_per_GB:l?",
.params = "[-r] [-b] second [sample_pages_per_GB]",
.help = "start a round of guest dirty rate measurement (using -r to"
"\n\t\t\t specify dirty ring as the method of calculation and"
"\n\t\t\t -b to specify dirty bitmap as method of calculation)",
.cmd = hmp_calc_dirty_rate,
},