diff options
| author | Denis V. Lunev <den@openvz.org> | 2024-09-05 21:19:41 +0200 |
|---|---|---|
| committer | Peter Xu <peterx@redhat.com> | 2024-09-09 10:55:40 -0400 |
| commit | 89bccecdda253c9a1a38921cf9266a4f9655c88c (patch) | |
| tree | 27abc91d157b20b6e9ac25b6d6743e7d2d89c56c /system/cpu-throttle.c | |
| parent | afe166d4e8bc33bc448cd573b55d0ac094187d48 (diff) | |
| download | focaccia-qemu-89bccecdda253c9a1a38921cf9266a4f9655c88c.tar.gz focaccia-qemu-89bccecdda253c9a1a38921cf9266a4f9655c88c.zip | |
system: improve migration debug
Right now migration_throttle() tracepoint lacks very important important information, i.e. no one could easily say how much the guest is throttled. This makes difficult to debug guest quality of service during migration. This patch adds one more tracepoint into cpu_throttle_set() which is actually doing this job. Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Peter Xu <peterx@redhat.com> CC: Fabiano Rosas <farosas@suse.de> CC: Paolo Bonzini <pbonzini@redhat.com> Link: https://lore.kernel.org/r/20240905191941.310592-1-den@openvz.org Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'system/cpu-throttle.c')
| -rw-r--r-- | system/cpu-throttle.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/system/cpu-throttle.c b/system/cpu-throttle.c index c951a6c65e..7632dc6143 100644 --- a/system/cpu-throttle.c +++ b/system/cpu-throttle.c @@ -28,6 +28,7 @@ #include "qemu/main-loop.h" #include "sysemu/cpus.h" #include "sysemu/cpu-throttle.h" +#include "trace.h" /* vcpu throttling controls */ static QEMUTimer *throttle_timer; @@ -95,6 +96,8 @@ void cpu_throttle_set(int new_throttle_pct) */ bool throttle_active = cpu_throttle_active(); + trace_cpu_throttle_set(new_throttle_pct); + /* Ensure throttle percentage is within valid range */ new_throttle_pct = MIN(new_throttle_pct, CPU_THROTTLE_PCT_MAX); new_throttle_pct = MAX(new_throttle_pct, CPU_THROTTLE_PCT_MIN); |