diff options
author | Claudio Fontana | 2020-06-29 11:35:03 +0200 |
---|---|---|
committer | Paolo Bonzini | 2020-07-11 00:04:49 +0200 |
commit | b0c3cf9407e642d74d1bbd18f8846872152a92df (patch) | |
tree | a14e3651b94efbc6a35f39d026c73dd96bca4080 /include/qemu/main-loop.h | |
parent | softmmu: move softmmu only files from root (diff) | |
download | qemu-b0c3cf9407e642d74d1bbd18f8846872152a92df.tar.gz qemu-b0c3cf9407e642d74d1bbd18f8846872152a92df.tar.xz qemu-b0c3cf9407e642d74d1bbd18f8846872152a92df.zip |
cpu-throttle: new module, extracted from cpus.c
move the vcpu throttling functionality into its own module.
This functionality is not specific to any accelerator,
and it is used currently by migration to slow down guests to try to
have migrations converge, and by the cocoa MacOS UI to throttle speed.
cpu-throttle contains the controls to adjust and inspect throttle
settings, start (set) and stop vcpu throttling, and the throttling
function itself that is run periodically on vcpus to make them take a nap.
Execution of the throttling function on all vcpus is triggered by a timer,
registered at module initialization.
No functionality change.
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20200629093504.3228-3-cfontana@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu/main-loop.h')
-rw-r--r-- | include/qemu/main-loop.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index a6d20b0719..8e98613656 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -303,6 +303,11 @@ void qemu_mutex_unlock_iothread(void); */ void qemu_cond_wait_iothread(QemuCond *cond); +/* + * qemu_cond_timedwait_iothread: like the previous, but with timeout + */ +void qemu_cond_timedwait_iothread(QemuCond *cond, int ms); + /* internal interfaces */ void qemu_fd_register(int fd); |