[PATCH v11 3/6] migration/dirtyrate: introduce struct and adjust DirtyRateStat

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) introduce "DirtyRateMeasureMode" to specify what method should be used to calculate dirty rate, introduce "DirtyRateVcpu" to store dirty rate fore each vcpu. use union to store stat data of specific mode Signed-off-by: Hyman Huang(黄勇) Message-Id: <661c98c40f40e163aa58334

[PATCH v11 5/6] migration/dirtyrate: move init step of calculation to main thread

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) since main thread may "query dirty rate" at any time, it's better to move init step into main thead so that synchronization overhead between "main" and "get_dirtyrate" can be reduced. Signed-off-by: Hyman Huang(黄勇) Message-Id: <109f8077518ed2f13068e3bfb10e625e964780f1.162

[PATCH v11 1/6] KVM: introduce dirty_pages and kvm_dirty_ring_enabled

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) dirty_pages is used to calculate dirtyrate via dirty ring, when enabled, kvm-reaper will increase the dirty pages after gfns being dirtied. kvm_dirty_ring_enabled shows if kvm-reaper is working. dirtyrate thread could use it to check if measurement can base on dirty ring fe

[PATCH v11 0/6] support dirtyrate at the granualrity of vcpu

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) v11 - rebase on master - call memory_global_dirty_log_sync before stopping dirty log when we calculate dirtyrate. this can make dirtyrate result more accurate, since kvm-reaper may be sleeping when there are dirty pages but not very much, this may lead to miss some pa

[PATCH v11 4/6] migration/dirtyrate: adjust order of registering thread

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) registering get_dirtyrate thread in advance so that both page-sampling and dirty-ring mode can be covered. Signed-off-by: Hyman Huang(黄勇) Message-Id: Reviewed-by: Peter Xu --- migration/dirtyrate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v11 6/6] migration/dirtyrate: implement dirty-ring dirtyrate calculation

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) 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

[PATCH v12 1/6] KVM: introduce dirty_pages and kvm_dirty_ring_enabled

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) dirty_pages is used to calculate dirtyrate via dirty ring, when enabled, kvm-reaper will increase the dirty pages after gfns being dirtied. kvm_dirty_ring_enabled shows if kvm-reaper is working. dirtyrate thread could use it to check if measurement can base on dirty ring fe

[PATCH v12 0/6] support dirtyrate at the granualrity of vcpu

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) v12 - adjust the order of calculating dirty rate let memory_global_dirty_log_sync before calculating as v11 version description. v11 - rebase on master - call memory_global_dirty_log_sync before stopping dirty log when we calculate dirtyrate. this can make dirtyrate

[PATCH v12 3/6] migration/dirtyrate: introduce struct and adjust DirtyRateStat

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) introduce "DirtyRateMeasureMode" to specify what method should be used to calculate dirty rate, introduce "DirtyRateVcpu" to store dirty rate fore each vcpu. use union to store stat data of specific mode Signed-off-by: Hyman Huang(黄勇) Message-Id: <661c98c40f40e163aa58334

[PATCH v12 2/6] memory: make global_dirty_tracking a bitmask

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) since dirty ring has been introduced, there are two methods to track dirty pages of vm. it seems that "logging" has a hint on the method, so rename the global_dirty_log to global_dirty_tracking would make description more accurate. dirty rate measurement may start or stop d

[PATCH v12 4/6] migration/dirtyrate: adjust order of registering thread

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) registering get_dirtyrate thread in advance so that both page-sampling and dirty-ring mode can be covered. Signed-off-by: Hyman Huang(黄勇) Message-Id: Reviewed-by: Peter Xu --- migration/dirtyrate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v12 6/6] migration/dirtyrate: implement dirty-ring dirtyrate calculation

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) 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

[PATCH v12 5/6] migration/dirtyrate: move init step of calculation to main thread

2021-06-29 Thread huangy81
From: Hyman Huang(黄勇) since main thread may "query dirty rate" at any time, it's better to move init step into main thead so that synchronization overhead between "main" and "get_dirtyrate" can be reduced. Signed-off-by: Hyman Huang(黄勇) Message-Id: <109f8077518ed2f13068e3bfb10e625e964780f1.162

<    1   2   3   4   5