mbox series

[00/16] Next round of migration atomic counters

Message ID 20230530122813.2674-1-quintela@redhat.com (mailing list archive)
Headers show
Series Next round of migration atomic counters | expand

Message

Juan Quintela May 30, 2023, 12:27 p.m. UTC
Hi

On this series:

- Make sure that qemu_file_transferred() make sense and its used
  coherently

- Use stat64 for qemu_file_transferred(), so we can call the function
  from any thread.

- Don't account for the same transfer twice (i.e. it is multifd_bytes,
  rdma_bytes or qemu_file_bytes) qemu_file_transferred() just sums all
  of them.

- Use this new counter for rate_limit()

- Remove old trasferred stat64 (now we use the real thing)

- Simplify qemu_file_get_error(): see where next cleanups are coming

- As an example, qemu_fflush() now return errors.

Please review.

Later, Juan.

Based-on: Message-Id: <20230530115429.1998-1-quintela@redhat.com>
Subject: [PULL 00/21] Migration 20230530 patches

Juan Quintela (16):
  qemu-file: Rename qemu_file_transferred_ fast -> noflush
  migration: Change qemu_file_transferred to noflush
  migration: Use qemu_file_transferred_noflush() for block migration.
  qemu-file: Don't call qemu_fflush() for read only files
  qemu-file: We only call qemu_file_transferred_* on the sending side
  qemu_file: Use a stat64 for qemu_file_transferred
  qemu_file: total_transferred is not used anymore
  migration: Use the number of transferred bytes directly
  qemu_file: Remove unused qemu_file_transferred()
  qemu-file: Remove _noflush from qemu_file_transferred_noflush()
  migration: migration_transferred_bytes() don't need the QEMUFile
  migration: migration_rate_limit_reset() don't need the QEMUFile
  qemu-file: Simplify qemu_file_get_error()
  migration: Use migration_transferred_bytes()
  migration: Remove transferred atomic counter
  qemu-file: Make qemu_fflush() return errors

 migration/migration-stats.h | 16 ++++++----------
 migration/qemu-file.h       | 29 +++++------------------------
 migration/colo.c            | 11 +++--------
 migration/migration-stats.c | 10 +++++-----
 migration/migration.c       | 17 ++++++-----------
 migration/multifd.c         |  3 ---
 migration/qemu-file.c       | 35 ++++++++++++++---------------------
 migration/ram.c             | 29 ++++++++++-------------------
 migration/rdma.c            |  4 +---
 migration/savevm.c          |  7 +++----
 migration/vmstate.c         |  4 ++--
 11 files changed, 55 insertions(+), 110 deletions(-)

Comments

Juan Quintela May 30, 2023, 12:40 p.m. UTC | #1
Juan Quintela <quintela@redhat.com> wrote:
> Hi

Hi

Fiona, I forgot to put your on the CC'd list.  This series should reget
the speed problem that you find.

Later, Juan.

> On this series:
>
> - Make sure that qemu_file_transferred() make sense and its used
>   coherently
>
> - Use stat64 for qemu_file_transferred(), so we can call the function
>   from any thread.
>
> - Don't account for the same transfer twice (i.e. it is multifd_bytes,
>   rdma_bytes or qemu_file_bytes) qemu_file_transferred() just sums all
>   of them.
>
> - Use this new counter for rate_limit()
>
> - Remove old trasferred stat64 (now we use the real thing)
>
> - Simplify qemu_file_get_error(): see where next cleanups are coming
>
> - As an example, qemu_fflush() now return errors.
>
> Please review.
>
> Later, Juan.
>
> Based-on: Message-Id: <20230530115429.1998-1-quintela@redhat.com>
> Subject: [PULL 00/21] Migration 20230530 patches
>
> Juan Quintela (16):
>   qemu-file: Rename qemu_file_transferred_ fast -> noflush
>   migration: Change qemu_file_transferred to noflush
>   migration: Use qemu_file_transferred_noflush() for block migration.
>   qemu-file: Don't call qemu_fflush() for read only files
>   qemu-file: We only call qemu_file_transferred_* on the sending side
>   qemu_file: Use a stat64 for qemu_file_transferred
>   qemu_file: total_transferred is not used anymore
>   migration: Use the number of transferred bytes directly
>   qemu_file: Remove unused qemu_file_transferred()
>   qemu-file: Remove _noflush from qemu_file_transferred_noflush()
>   migration: migration_transferred_bytes() don't need the QEMUFile
>   migration: migration_rate_limit_reset() don't need the QEMUFile
>   qemu-file: Simplify qemu_file_get_error()
>   migration: Use migration_transferred_bytes()
>   migration: Remove transferred atomic counter
>   qemu-file: Make qemu_fflush() return errors
>
>  migration/migration-stats.h | 16 ++++++----------
>  migration/qemu-file.h       | 29 +++++------------------------
>  migration/colo.c            | 11 +++--------
>  migration/migration-stats.c | 10 +++++-----
>  migration/migration.c       | 17 ++++++-----------
>  migration/multifd.c         |  3 ---
>  migration/qemu-file.c       | 35 ++++++++++++++---------------------
>  migration/ram.c             | 29 ++++++++++-------------------
>  migration/rdma.c            |  4 +---
>  migration/savevm.c          |  7 +++----
>  migration/vmstate.c         |  4 ++--
>  11 files changed, 55 insertions(+), 110 deletions(-)