migration/next for 20151203
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCAAGBQJWX3xuAAoJEPSH7xhYctcj9TMP/2zV51BQtlDYACAiMGQy028I bpY/oNlq0zNeNAGoTe9cGsYsEF5PUx5iPLZiFKnfkcL7zLeHX4O5WW+NlZTUF8LP ZaJg8Qq9rheTCv6Mgd7VKyRfbSR21FBYouOxIp0MMgoABlFNOeDWQczQSdi/AiYt glq9uMan3pxky3vxyfDxVTpvIi/wSfa6VviJMW15wsabflUTu+owieivMtlXby5u sGEvJYINVJOz0KwdXP6mYmPBhbPZHuu1Df6pnrXWbc2U4CqR0vortiZ0fynYAFiQ iFJNkJgq+FpUQciKa2x9ERKi6D+E2r48N72R/DlGOB1ICIpexoPryxlvV+dla1hR DYJAr8wpZpltcpx4/XDagY155Mllxg+/pX28f0yVQi5CHDgcqlEC1a/h9Jjvdm0p kP7lt4eCKmXmcjpgh7ofRrHDdyXzujiyleykaoPfrUqD8Vxa6/hfnPJ4Kf7vZU+U 6O1J2CGjhYMb2fHoeh459Kzb8Z9W3l2YxLVY86LcHIheMBuoP/tij8oTVDHnfr0Q NyG9z6aS1+Rcrq1+c31zOl3Q1AOki4aJimW2Vw/Oh3YTjCIrtQlzjNM8DZOMrku8 Z//KZsr39Pjpfv+T+TyxbMqaZzDn03Mlu7MwWG6ee6Gc21zlZ773YNJLduIjDkZc oPRPvMIhBOn2d56hr6bd =Vo4/ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20151203' into staging migration/next for 20151203 # gpg: Signature made Wed 02 Dec 2015 23:19:10 GMT using RSA key ID 5872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" # gpg: aka "Juan Quintela <quintela@trasno.org>" * remotes/juanquintela/tags/migration/20151203: migration: do floating-point division migration: Clean up use of g_poll() in socket_writev_buffer() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
eab0ebc7fe
@ -1674,7 +1674,7 @@ static void *migration_thread(void *opaque)
|
||||
if (current_time >= initial_time + BUFFER_DELAY) {
|
||||
uint64_t transferred_bytes = qemu_ftell(s->file) - initial_bytes;
|
||||
uint64_t time_spent = current_time - initial_time;
|
||||
double bandwidth = transferred_bytes / time_spent;
|
||||
double bandwidth = (double)transferred_bytes / time_spent;
|
||||
max_size = bandwidth * migrate_max_downtime() / 1000000;
|
||||
|
||||
s->mbps = time_spent ? (((double) transferred_bytes * 8.0) /
|
||||
|
@ -72,7 +72,8 @@ static ssize_t socket_writev_buffer(void *opaque, struct iovec *iov, int iovcnt,
|
||||
pfd.fd = s->fd;
|
||||
pfd.events = G_IO_OUT | G_IO_ERR;
|
||||
pfd.revents = 0;
|
||||
g_poll(&pfd, 1 /* 1 fd */, -1 /* no timeout */);
|
||||
TFR(err = g_poll(&pfd, 1, -1 /* no timeout */));
|
||||
/* Errors other than EINTR intentionally ignored */
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user