2 * Dirtyrate common functions
4 * Copyright (c) 2020 HUAWEI TECHNOLOGIES CO., LTD.
7 * Chuan Zheng <zhengchuan@huawei.com>
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
13 #ifndef QEMU_MIGRATION_DIRTYRATE_H
14 #define QEMU_MIGRATION_DIRTYRATE_H
17 * Sample 512 pages per GB as default.
18 * TODO: Make it configurable.
20 #define DIRTYRATE_DEFAULT_SAMPLE_PAGES 512
22 struct DirtyRateConfig
{
23 uint64_t sample_pages_per_gigabytes
; /* sample pages per GB */
24 int64_t sample_period_seconds
; /* time duration between two sampling */
27 void *get_dirtyrate_thread(void *arg
);