memory: introduce total_dirty_pages to stat dirty pages

introduce global var total_dirty_pages to stat dirty pages
along with memory_global_dirty_log_sync.

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:16 +08:00 committed by Juan Quintela
parent 6fee3a1fd9
commit 4998a37e4b
2 changed files with 16 additions and 0 deletions

View file

@ -28,6 +28,13 @@
#include "sysemu/runstate.h"
#include "exec/memory.h"
/*
* total_dirty_pages is procted by BQL and is used
* to stat dirty pages during the period of two
* memory_global_dirty_log_sync
*/
uint64_t total_dirty_pages;
typedef struct DirtyPageRecord {
uint64_t start_pages;
uint64_t end_pages;