Received: from eggs.gnu.org ([2001:4830:134:3::10]:33621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIXkV-0005TY-UI for qemu-devel@nongnu.org; Wed, 07 Jun 2017 05:59:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIXkV-0005KD-8D for qemu-devel@nongnu.org; Wed, 07 Jun 2017 05:59:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45886) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dIXkV-0005K0-2a for qemu-devel@nongnu.org; Wed, 07 Jun 2017 05:59:35 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E5DE87F3F5 for ; Wed, 7 Jun 2017 09:59:33 +0000 (UTC) From: Juan Quintela Date: Wed, 7 Jun 2017 11:59:21 +0200 Message-Id: <20170607095926.1834-3-quintela@redhat.com> In-Reply-To: <20170607095926.1834-1-quintela@redhat.com> References: <20170607095926.1834-1-quintela@redhat.com> Subject: [Qemu-devel] [PULL 2/7] ram: We only print throttling information sometimes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: dgilbert@redhat.com, lvivier@redhat.com, peterx@redhat.com Change it to be consistent with everything else. Signed-off-by: Juan Quintela Reviewed-by: Eric Blake --- migration/migration.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index b1e68c0..9c5ff57 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -616,6 +616,11 @@ static void populate_ram_info(MigrationInfo *info, MigrationState *s) info->xbzrle_cache->overflow = xbzrle_mig_pages_overflow(); } + if (cpu_throttle_active()) { + info->has_cpu_throttle_percentage = true; + info->cpu_throttle_percentage = cpu_throttle_get_percentage(); + } + if (s->state != MIGRATION_STATUS_COMPLETED) { info->ram->remaining = ram_bytes_remaining(); info->ram->dirty_pages_rate = ram_dirty_pages_rate(); @@ -656,11 +661,6 @@ MigrationInfo *qmp_query_migrate(Error **errp) info->disk->total = blk_mig_bytes_total(); } - if (cpu_throttle_active()) { - info->has_cpu_throttle_percentage = true; - info->cpu_throttle_percentage = cpu_throttle_get_percentage(); - } - break; case MIGRATION_STATUS_POSTCOPY_ACTIVE: /* Mostly the same as active; TODO add some postcopy stats */ -- 2.9.4