diff options
author | Michael R. Hines <mrhines@us.ibm.com> | 2013-06-25 21:35:28 -0400 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2013-06-27 02:38:35 +0200 |
commit | 2b0ce0797d6bfb13ebefe010da86abced0b7a9b3 (patch) | |
tree | f98468e6dc3457bc43c451b6ce4fc5cabce3c96c /include/migration | |
parent | f4abc9d621823b14a6cd508c66c1ecb21f96349e (diff) | |
download | qemu-2b0ce0797d6bfb13ebefe010da86abced0b7a9b3.zip qemu-2b0ce0797d6bfb13ebefe010da86abced0b7a9b3.tar.gz qemu-2b0ce0797d6bfb13ebefe010da86abced0b7a9b3.tar.bz2 |
rdma: introduce qemu_update_position()
RDMA writes happen asynchronously, and thus the performance accounting
also needs to be able to occur asynchronously. This allows anybody
to call into savevm.c to update both f->pos as well as into arch_init.c
to update the acct_info structure with up-to-date values when
the RDMA transfer actually completes.
Reviewed-by: Juan Quintela <quintela@redhat.com>
Tested-by: Chegu Vinod <chegu_vinod@hp.com>
Tested-by: Michael R. Hines <mrhines@us.ibm.com>
Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'include/migration')
-rw-r--r-- | include/migration/migration.h | 2 | ||||
-rw-r--r-- | include/migration/qemu-file.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/migration/migration.h b/include/migration/migration.h index e2acec6..0be28a2 100644 --- a/include/migration/migration.h +++ b/include/migration/migration.h @@ -92,6 +92,8 @@ uint64_t ram_bytes_remaining(void); uint64_t ram_bytes_transferred(void); uint64_t ram_bytes_total(void); +void acct_update_position(QEMUFile *f, size_t size, bool zero); + extern SaveVMHandlers savevm_ram_handlers; uint64_t dup_mig_bytes_transferred(void); diff --git a/include/migration/qemu-file.h b/include/migration/qemu-file.h index 7519464..8fab0dd 100644 --- a/include/migration/qemu-file.h +++ b/include/migration/qemu-file.h @@ -93,6 +93,7 @@ void qemu_put_be32(QEMUFile *f, unsigned int v); void qemu_put_be64(QEMUFile *f, uint64_t v); int qemu_get_buffer(QEMUFile *f, uint8_t *buf, int size); int qemu_get_byte(QEMUFile *f); +void qemu_update_position(QEMUFile *f, size_t size); static inline unsigned int qemu_get_ubyte(QEMUFile *f) { |