]> git.proxmox.com Git - mirror_qemu.git/commit - migration/ram.c
cpu-throttle: new module, extracted from cpus.c
authorClaudio Fontana <cfontana@suse.de>
Mon, 29 Jun 2020 09:35:03 +0000 (11:35 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jul 2020 22:04:49 +0000 (18:04 -0400)
commitb0c3cf9407e642d74d1bbd18f8846872152a92df
treea14e3651b94efbc6a35f39d026c73dd96bca4080
parentc7f419f5841a840f3b90e839ef014b94131e5df8
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>
MAINTAINERS
include/hw/core/cpu.h
include/qemu/main-loop.h
include/sysemu/cpu-throttle.h [new file with mode: 0644]
migration/migration.c
migration/ram.c
softmmu/Makefile.objs
softmmu/cpu-throttle.c [new file with mode: 0644]
softmmu/cpus.c
ui/cocoa.m