aboutsummaryrefslogtreecommitdiff
path: root/migration/migration.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-05-15 11:33:39 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-05-15 11:33:39 -0700
commitc095228e8a8cdf5c15bb8a47c4d069582ae017d1 (patch)
tree8588f6ed99945747315010077af85b900291ac17 /migration/migration.c
parent18b6727083acceac5d76ea0b8cb6f5cdef6858a7 (diff)
parent6da835d42a2163b43578ae745bc613b06dd5d23c (diff)
downloadqemu-c095228e8a8cdf5c15bb8a47c4d069582ae017d1.zip
qemu-c095228e8a8cdf5c15bb8a47c4d069582ae017d1.tar.gz
qemu-c095228e8a8cdf5c15bb8a47c4d069582ae017d1.tar.bz2
Merge tag 'migration-20230515-pull-request' of https://gitlab.com/juan.quintela/qemu into staging
Migration Pull request 20230515 Hi On this PULL: - use xxHash for calculate dirty_rate (andrei) - Create qemu_target_pages_to_MiB() and use them (quintela) - make dirtyrate target independent (quintela) - Merge 5 patches from atomic counters series (quintela) Please apply. # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmRiJoUACgkQ9IfvGFhy # 1yO1ExAAsSStVAUh/tSgu5fhXydJVkBMO6LOj1k+tA7qylwv4QsqZ/pLNBvY8Zms # 8/bpYtlvw1LwCSaq01oNA6RhBhkBaZ5x0PUViCY87dsJhu0hEo68Jcp0FkrkW93E # OiIsp9NU7wpnqd88ZhzjcZ/viWebPw3660V5KY4/8ZZFVxJaKMhG+vW3pGYH8yDR # TmZK5E5e3t5yiwDRRPrkAw3+e+GDwfwNuOBkk+NBJdL1mOZnIfVwFwxRAXWn/vEM # f6NdT3aXplsNeKPCN1w9zrLhOJdHeu8IlhWhT/cjTgOKemBJBYzftH6dI/X9D0ix # ghWAzFSJh1S38gw0mMef1VERJqh7JpAkTq7vT2x7J/0UIbIAru0yRiSrHbNBCcvL # efsVFtjyseKq70qKN515uoqbK6mlnxP+eECIAUmesUx0bJI9jDWzn+KVc86xUvWy # +98KDcPuYVxdVp4XHAIsyHYOfTY/tJwG5KI4hYgGP7uxFVr/qus3eBB/Q5BBVPOx # X0A/760iehfV0V0UmVEt8mC7uDjI0JBouenUHcURAtbsnuGRMCz6s1kLsZYaHuGV # NhihXq6jnwcvn2nGGnXY44TsgBWesfUrCFZOjJzbaSjGH5UpipC0SECKqh1GKoQP # kdknvyej5h8egU2QFdS8sCUeXIfwAtHfCamtnui3b3E3iF3TSco= # =8gfA # -----END PGP SIGNATURE----- # gpg: Signature made Mon 15 May 2023 05:33:09 AM PDT # gpg: using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [undefined] # gpg: aka "Juan Quintela <quintela@trasno.org>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723 * tag 'migration-20230515-pull-request' of https://gitlab.com/juan.quintela/qemu: qemu-file: Remove total from qemu_file_total_transferred_*() qemu-file: Make rate_limit_used an uint64_t qemu-file: make qemu_file_[sg]et_rate_limit() use an uint64_t migration: We set the rate_limit by a second migration: A rate limit value of 0 is valid migration: Make dirtyrate.c target independent migration: Teach dirtyrate about qemu_target_page_bits() migration: Teach dirtyrate about qemu_target_page_size() Use new created qemu_target_pages_to_MiB() softmmu: Create qemu_target_pages_to_MiB() migration/calc-dirty-rate: replaced CRC32 with xxHash Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'migration/migration.c')
-rw-r--r--migration/migration.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 439e865..00d8ba8 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2140,12 +2140,7 @@ static int postcopy_start(MigrationState *ms)
* will notice we're in POSTCOPY_ACTIVE and not actually
* wrap their state up here
*/
- /* 0 max-postcopy-bandwidth means unlimited */
- if (!bandwidth) {
- qemu_file_set_rate_limit(ms->to_dst_file, INT64_MAX);
- } else {
- qemu_file_set_rate_limit(ms->to_dst_file, bandwidth / XFER_LIMIT_RATIO);
- }
+ qemu_file_set_rate_limit(ms->to_dst_file, bandwidth);
if (migrate_postcopy_ram()) {
/* Ping just for debugging, helps line traces up */
qemu_savevm_send_ping(ms->to_dst_file, 2);
@@ -2653,7 +2648,7 @@ static MigThrError migration_detect_error(MigrationState *s)
/* How many bytes have we transferred since the beginning of the migration */
static uint64_t migration_total_bytes(MigrationState *s)
{
- return qemu_file_total_transferred(s->to_dst_file) +
+ return qemu_file_transferred(s->to_dst_file) +
stat64_get(&mig_stats.multifd_bytes);
}
@@ -3236,11 +3231,10 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
if (resume) {
/* This is a resumed migration */
- rate_limit = migrate_max_postcopy_bandwidth() /
- XFER_LIMIT_RATIO;
+ rate_limit = migrate_max_postcopy_bandwidth();
} else {
/* This is a fresh new migration */
- rate_limit = migrate_max_bandwidth() / XFER_LIMIT_RATIO;
+ rate_limit = migrate_max_bandwidth();
/* Notify before starting migration thread */
notifier_list_notify(&migration_state_notifiers, s);