]>
Commit | Line | Data |
---|---|---|
4240dcee CZ |
1 | /* |
2 | * Dirtyrate common functions | |
3 | * | |
4 | * Copyright (c) 2020 HUAWEI TECHNOLOGIES CO., LTD. | |
5 | * | |
6 | * Authors: | |
7 | * Chuan Zheng <zhengchuan@huawei.com> | |
8 | * | |
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. | |
11 | */ | |
12 | ||
13 | #ifndef QEMU_MIGRATION_DIRTYRATE_H | |
14 | #define QEMU_MIGRATION_DIRTYRATE_H | |
15 | ||
16 | /* | |
17 | * Sample 512 pages per GB as default. | |
18 | * TODO: Make it configurable. | |
19 | */ | |
20 | #define DIRTYRATE_DEFAULT_SAMPLE_PAGES 512 | |
21 | ||
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 */ | |
25 | }; | |
26 | ||
27 | void *get_dirtyrate_thread(void *arg); | |
28 | #endif |