]>
Commit | Line | Data |
---|---|---|
8244166d HH |
1 | /* |
2 | * dirty page rate helper functions | |
3 | * | |
4 | * Copyright (c) 2022 CHINA TELECOM CO.,LTD. | |
5 | * | |
6 | * Authors: | |
7 | * Hyman Huang(黄勇) <huangy81@chinatelecom.cn> | |
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_DIRTYRATE_H | |
14 | #define QEMU_DIRTYRATE_H | |
15 | ||
7a5951f6 MA |
16 | #include "qapi/qapi-types-migration.h" |
17 | ||
8244166d HH |
18 | typedef struct VcpuStat { |
19 | int nvcpu; /* number of vcpu */ | |
20 | DirtyRateVcpu *rates; /* array of dirty rate for each vcpu */ | |
21 | } VcpuStat; | |
22 | ||
23 | int64_t vcpu_calculate_dirtyrate(int64_t calc_time_ms, | |
24 | VcpuStat *stat, | |
25 | unsigned int flag, | |
26 | bool one_shot); | |
27 | ||
28 | void global_dirty_log_change(unsigned int flag, | |
29 | bool start); | |
30 | #endif |