aboutsummaryrefslogtreecommitdiff
path: root/migration/ram.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-09-25 14:46:18 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-09-25 14:46:18 +0100
commit8d16e72f2d4df2c9e631393adf1669a1da7efe8a (patch)
treebadeaa53bb34f24540bf03dc00e536483eaa61f1 /migration/ram.c
parent8c1c07929feae876202ba26f07a540c5115c18cd (diff)
parente12a0edafeb5019aac74114b62a4703f79c5c693 (diff)
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20200925a' into staging
Migration and virtiofsd pull Chuan Zheng's Dirtyrate and TLS changes, with small fixes from Dov and Luarent. Small virtiofs changes from Harry, Stefan, Vivek and Jiachen. One HMP/monitor rework from me. # gpg: Signature made Fri 25 Sep 2020 13:03:50 BST # gpg: using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full] # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-migration-20200925a: (26 commits) virtiofsd: Add -o allow_direct_io|no_allow_direct_io options virtiofsd: Used glib "shared" thread pool virtiofsd: document cache=auto default monitor: Use LOCK_GUARD macros migration/tls: add trace points for multifd-tls migration/tls: add support for multifd tls-handshake migration/tls: extract cleanup function for common-use migration/tls: add tls_hostname into MultiFDSendParams migration/tls: extract migration_tls_client_create for common-use migration/tls: save hostname into MigrationState migration: increase max-bandwidth to 128 MiB/s (1 Gib/s) migration: Truncate state file in xen-save-devices-state migration/dirtyrate: Add trace_calls to make it easier to debug migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function migration/dirtyrate: Implement calculate_dirtyrate() function migration/dirtyrate: Implement set_sample_page_period() and is_sample_period_valid() migration/dirtyrate: skip sampling ramblock with size below MIN_RAMBLOCK_SIZE migration/dirtyrate: Compare page hash results for recorded sampled page migration/dirtyrate: Record hash results for each sampled page migration/dirtyrate: move RAMBLOCK_FOREACH_MIGRATABLE into ram.h ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'migration/ram.c')
-rw-r--r--migration/ram.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/migration/ram.c b/migration/ram.c
index c5f36aeae5..433489d633 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -158,21 +158,12 @@ out:
return ret;
}
-static bool ramblock_is_ignored(RAMBlock *block)
+bool ramblock_is_ignored(RAMBlock *block)
{
return !qemu_ram_is_migratable(block) ||
(migrate_ignore_shared() && qemu_ram_is_shared(block));
}
-/* Should be holding either ram_list.mutex, or the RCU lock. */
-#define RAMBLOCK_FOREACH_NOT_IGNORED(block) \
- INTERNAL_RAMBLOCK_FOREACH(block) \
- if (ramblock_is_ignored(block)) {} else
-
-#define RAMBLOCK_FOREACH_MIGRATABLE(block) \
- INTERNAL_RAMBLOCK_FOREACH(block) \
- if (!qemu_ram_is_migratable(block)) {} else
-
#undef RAMBLOCK_FOREACH
int foreach_not_ignored_block(RAMBlockIterFunc func, void *opaque)