diff options
author | Hyman Huang(黄勇) | 2022-06-25 19:38:35 +0200 |
---|---|---|
committer | Dr. David Alan Gilbert | 2022-07-20 13:15:08 +0200 |
commit | baa609832e1849915b62be2abfbdc1d0e5909a7b (patch) | |
tree | 3a679a7051cd4547dabd3afcf1b777bdb1aae60f /softmmu/trace-events | |
parent | accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function (diff) | |
download | qemu-baa609832e1849915b62be2abfbdc1d0e5909a7b.tar.gz qemu-baa609832e1849915b62be2abfbdc1d0e5909a7b.tar.xz qemu-baa609832e1849915b62be2abfbdc1d0e5909a7b.zip |
softmmu/dirtylimit: Implement virtual CPU throttle
Setup a negative feedback system when vCPU thread
handling KVM_EXIT_DIRTY_RING_FULL exit by introducing
throttle_us_per_full field in struct CPUState. Sleep
throttle_us_per_full microseconds to throttle vCPU
if dirtylimit is in service.
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <977e808e03a1cef5151cae75984658b6821be618.1656177590.git.huangy81@chinatelecom.cn>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'softmmu/trace-events')
-rw-r--r-- | softmmu/trace-events | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/softmmu/trace-events b/softmmu/trace-events index 9c88887b3c..22606dc27b 100644 --- a/softmmu/trace-events +++ b/softmmu/trace-events @@ -31,3 +31,10 @@ runstate_set(int current_state, const char *current_state_str, int new_state, co system_wakeup_request(int reason) "reason=%d" qemu_system_shutdown_request(int reason) "reason=%d" qemu_system_powerdown_request(void) "" + +#dirtylimit.c +dirtylimit_state_initialize(int max_cpus) "dirtylimit state initialize: max cpus %d" +dirtylimit_state_finalize(void) +dirtylimit_throttle_pct(int cpu_index, uint64_t pct, int64_t time_us) "CPU[%d] throttle percent: %" PRIu64 ", throttle adjust time %"PRIi64 " us" +dirtylimit_set_vcpu(int cpu_index, uint64_t quota) "CPU[%d] set dirty page rate limit %"PRIu64 +dirtylimit_vcpu_execute(int cpu_index, int64_t sleep_time_us) "CPU[%d] sleep %"PRIi64 " us" |