migration/dirtyrate: implement dirty-ring dirtyrate calculation

use dirty ring feature to implement dirtyrate calculation.

introduce mode option in qmp calc_dirty_rate to specify what
method should be used when calculating dirtyrate, either
page-sampling or dirty-ring should be passed.

introduce "dirty_ring:-r" option in hmp calc_dirty_rate to
indicate dirty ring method should be used for calculation.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Message-Id: <7db445109bd18125ce8ec86816d14f6ab5de6a7d.1624040308.git.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-06-29 16:01:23 +00:00
committed by Juan Quintela
parent 9865d0f68f
commit 0e21bf2460
4 changed files with 218 additions and 15 deletions

View File

@ -1737,8 +1737,9 @@ ERST
{
.name = "calc_dirty_rate",
.args_type = "second:l,sample_pages_per_GB:l?",
.params = "second [sample_pages_per_GB]",
.help = "start a round of guest dirty rate measurement",
.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)",
.cmd = hmp_calc_dirty_rate,
},