aboutsummaryrefslogtreecommitdiff
path: root/migration/dirtyrate.h
diff options
context:
space:
mode:
authorChuan Zheng <zhengchuan@huawei.com>2020-09-16 14:22:03 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-09-25 12:45:57 +0100
commitf82583cdc05b89e5900e44ceacb6cc85f974b448 (patch)
treec50862024368f8f239e8c8f66cad9d85342be18b /migration/dirtyrate.h
parent9c04387b88a7685ab2b1f77911a56e91d8f67b6d (diff)
downloadqemu-f82583cdc05b89e5900e44ceacb6cc85f974b448.zip
qemu-f82583cdc05b89e5900e44ceacb6cc85f974b448.tar.gz
qemu-f82583cdc05b89e5900e44ceacb6cc85f974b448.tar.bz2
migration/dirtyrate: skip sampling ramblock with size below MIN_RAMBLOCK_SIZE
In order to sample real RAM, skip ramblock with size below MIN_RAMBLOCK_SIZE which is set as 128M. Signed-off-by: Chuan Zheng <zhengchuan@huawei.com> Reviewed-by: David Edmondson <david.edmondson@oracle.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Li Qiang <liq3ea@gmail.com> Message-Id: <1600237327-33618-9-git-send-email-zhengchuan@huawei.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/dirtyrate.h')
-rw-r--r--migration/dirtyrate.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/migration/dirtyrate.h b/migration/dirtyrate.h
index 312debc..be5b8ec 100644
--- a/migration/dirtyrate.h
+++ b/migration/dirtyrate.h
@@ -24,6 +24,11 @@
*/
#define RAMBLOCK_INFO_MAX_LEN 256
+/*
+ * Minimum RAMBlock size to sample, in megabytes.
+ */
+#define MIN_RAMBLOCK_SIZE 128
+
struct DirtyRateConfig {
uint64_t sample_pages_per_gigabytes; /* sample pages per GB */
int64_t sample_period_seconds; /* time duration between two sampling */