From: Wei Wang <wei.w.wang@intel.com>
To: qemu-devel@nongnu.org
Cc: quintela@redhat.com, dgilbert@redhat.com, peterx@redhat.com,
Wei Wang <wei.w.wang@intel.com>
Subject: [Qemu-devel] [PATCH v1] migration: use s->threshold_size inside migration_update_counters
Date: Tue, 16 Jan 2018 18:51:32 +0800 [thread overview]
Message-ID: <1516099892-34247-1-git-send-email-wei.w.wang@intel.com> (raw)
The threshold size is changed to be recorded in s->threshold_size by
commit b15df1ae5063c7c181f8f068f9eba7661b3b5e1.
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
---
migration/migration.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index d3a1c49..bfd1a16 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2212,7 +2212,6 @@ static void migration_update_counters(MigrationState *s,
int64_t current_time)
{
uint64_t transferred, time_spent;
- int64_t threshold_size;
double bandwidth;
if (current_time < s->iteration_start_time + BUFFER_DELAY) {
@@ -2222,7 +2221,7 @@ static void migration_update_counters(MigrationState *s,
transferred = qemu_ftell(s->to_dst_file) - s->iteration_initial_bytes;
time_spent = current_time - s->iteration_start_time;
bandwidth = (double)transferred / time_spent;
- threshold_size = bandwidth * s->parameters.downtime_limit;
+ s->threshold_size = bandwidth * s->parameters.downtime_limit;
s->mbps = (((double) transferred * 8.0) /
((double) time_spent / 1000.0)) / 1000.0 / 1000.0;
@@ -2242,7 +2241,7 @@ static void migration_update_counters(MigrationState *s,
s->iteration_initial_bytes = qemu_ftell(s->to_dst_file);
trace_migrate_transferred(transferred, time_spent,
- bandwidth, threshold_size);
+ bandwidth, s->threshold_size);
}
/* Migration thread iteration status */
--
1.8.3.1
next reply other threads:[~2018-01-16 11:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-16 10:51 Wei Wang [this message]
2018-01-16 12:19 ` [Qemu-devel] [PATCH v1] migration: use s->threshold_size inside migration_update_counters Peter Xu
2018-01-17 1:06 ` Wei Wang
2018-01-17 4:05 ` Peter Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516099892-34247-1-git-send-email-wei.w.wang@intel.com \
--to=wei.w.wang@intel.com \
--cc=dgilbert@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).