diff options
author | Hyman Huang(黄勇) <huangy81@chinatelecom.cn> | 2022-06-26 01:38:33 +0800 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2022-07-20 12:15:08 +0100 |
commit | cc2b33eab03710ae9dcb3ff68e8fcc634d1e9ad2 (patch) | |
tree | 0b4029a1cfe60ac541e2791032e7777daeae5fc7 /include/exec | |
parent | 8244166dec65eb295d09787021522d38171b06c7 (diff) | |
download | qemu-cc2b33eab03710ae9dcb3ff68e8fcc634d1e9ad2.zip qemu-cc2b33eab03710ae9dcb3ff68e8fcc634d1e9ad2.tar.gz qemu-cc2b33eab03710ae9dcb3ff68e8fcc634d1e9ad2.tar.bz2 |
softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically
Introduce the third method GLOBAL_DIRTY_LIMIT of dirty
tracking for calculate dirtyrate periodly for dirty page
rate limit.
Add dirtylimit.c to implement dirtyrate calculation periodly,
which will be used for dirty page rate limit.
Add dirtylimit.h to export util functions for dirty page rate
limit implementation.
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <5d0d641bffcb9b1c4cc3e323b6dfecb36050d948.1656177590.git.huangy81@chinatelecom.cn>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'include/exec')
-rw-r--r-- | include/exec/memory.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h index a6a0f4d..bfb1de8 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -69,7 +69,10 @@ static inline void fuzz_dma_read_cb(size_t addr, /* Dirty tracking enabled because measuring dirty rate */ #define GLOBAL_DIRTY_DIRTY_RATE (1U << 1) -#define GLOBAL_DIRTY_MASK (0x3) +/* Dirty tracking enabled because dirty limit */ +#define GLOBAL_DIRTY_LIMIT (1U << 2) + +#define GLOBAL_DIRTY_MASK (0x7) extern unsigned int global_dirty_tracking; |