On 5/25/20 4:54 PM, Claudio Fontana wrote: > 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 <cfont...@suse.de> > --- > MAINTAINERS | 3 +- > include/hw/core/cpu.h | 37 ------------- > include/qemu/main-loop.h | 5 ++ > include/sysemu/cpu-throttle.h | 50 +++++++++++++++++ > migration/migration.c | 1 + > migration/ram.c | 1 + > softmmu/Makefile.objs | 1 + > softmmu/cpu-throttle.c | 122 > ++++++++++++++++++++++++++++++++++++++++++ > softmmu/cpus.c | 95 +++----------------------------- > 9 files changed, 190 insertions(+), 125 deletions(-) > create mode 100644 include/sysemu/cpu-throttle.h > create mode 100644 softmmu/cpu-throttle.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index 0288ffbc50..708768f120 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -2147,13 +2147,14 @@ F: ui/cocoa.m > Main loop > M: Paolo Bonzini <pbonz...@redhat.com> > S: Maintained > -F: softmmu/cpus.c > F: include/qemu/main-loop.h > F: include/sysemu/runstate.h > F: util/main-loop.c > F: util/qemu-timer.c > F: softmmu/vl.c > F: softmmu/main.c > +F: softmmu/cpus.c
This line belong the the previous patch (#1). > +F: softmmu/cpu-throttle.c > F: qapi/run-state.json Can you reorder patches #1/#2 to avoid moving cpu-throttle code twice? Otherwise this patch looks good. [...]