mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
migration: Extend query-migrate to provide dirty page limit info
Extend query-migrate to provide throttle time and estimated ring full time with dirty-limit capability enabled, through which we can observe if dirty limit take effect during live migration. Signed-off-by: Hyman Huang(黄勇) <yong.huang@smartx.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-ID: <168733225273.5845.15871826788879741674-8@git.sr.ht> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
acac51ba24
commit
15699cf542
5 changed files with 76 additions and 1 deletions
|
@ -190,6 +190,16 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict)
|
|||
info->cpu_throttle_percentage);
|
||||
}
|
||||
|
||||
if (info->has_dirty_limit_throttle_time_per_round) {
|
||||
monitor_printf(mon, "dirty-limit throttle time: %" PRIu64 " us\n",
|
||||
info->dirty_limit_throttle_time_per_round);
|
||||
}
|
||||
|
||||
if (info->has_dirty_limit_ring_full_time) {
|
||||
monitor_printf(mon, "dirty-limit ring full time: %" PRIu64 " us\n",
|
||||
info->dirty_limit_ring_full_time);
|
||||
}
|
||||
|
||||
if (info->has_postcopy_blocktime) {
|
||||
monitor_printf(mon, "postcopy blocktime: %u\n",
|
||||
info->postcopy_blocktime);
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
#include "yank_functions.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "options.h"
|
||||
#include "sysemu/dirtylimit.h"
|
||||
|
||||
static NotifierList migration_state_notifiers =
|
||||
NOTIFIER_LIST_INITIALIZER(migration_state_notifiers);
|
||||
|
@ -974,6 +975,15 @@ static void populate_ram_info(MigrationInfo *info, MigrationState *s)
|
|||
info->ram->dirty_pages_rate =
|
||||
stat64_get(&mig_stats.dirty_pages_rate);
|
||||
}
|
||||
|
||||
if (migrate_dirty_limit() && dirtylimit_in_service()) {
|
||||
info->has_dirty_limit_throttle_time_per_round = true;
|
||||
info->dirty_limit_throttle_time_per_round =
|
||||
dirtylimit_throttle_time_per_round();
|
||||
|
||||
info->has_dirty_limit_ring_full_time = true;
|
||||
info->dirty_limit_ring_full_time = dirtylimit_ring_full_time();
|
||||
}
|
||||
}
|
||||
|
||||
static void populate_disk_info(MigrationInfo *info)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue