qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/41] Migration cleanups, refactorings, stats, and more
@ 2012-09-21  8:46 Juan Quintela
  2012-09-21  8:46 ` [Qemu-devel] [PATCH 01/41] buffered_file: g_realloc() can't fail Juan Quintela
                   ` (40 more replies)
  0 siblings, 41 replies; 95+ messages in thread
From: Juan Quintela @ 2012-09-21  8:46 UTC (permalink / raw)
  To: qemu-devel

Hi

This is the mergable part of migration thread work that I am doing.
What it does:
- cleanups left and right
- 2nd patch is a (fix migration sync) should be applied to stable IMHO
   Othrewise, we "could" be sending zero pages 2 times.
- It introduces the stats discused previously
   * expected_downtime
   * downtime
   * dirty_pages_rate
     All Eric & Luiz comments have been addressed
- buffered file has been basically unfolded.  It was used only once,
  with one user.  So we de-abstracted it.
  Notice that with migration patches, it makes no sense anymore
- migration bitmap

  Now the bitmap is 1bit per page.  Notice that this only affects to
  migration.  For the rest (aka TCG & VGA), we still use the old bitmap.

- remove qemu_file* functions that were not used or used only once
- last_error: we have made that almost all error paths return one error
  instead of zero, so we use much, much less the error on the qemu_file.
  Some of the last remmants are:
  * still there due to callbacks (can be removed when the thread is
    integrated)
  * are on the read path (I haven't touched a lot of those yet)
- qemu_cpu_is_vcpu()

  We used to test if we were _not_ an vcpu testing if we were the
  iothread.  With the migration thread that is not true anymore.  So
  create a function that does the right thing.

Please review.

Thanks, Juan.

The following changes since commit c26032b2c91721245bfec542d94f37a0238e986e:

  target-xtensa: don't emit extra tcg_gen_goto_tb (2012-09-21 03:07:27 +0400)

are available in the git repository at:

  http://repo.or.cz/r/qemu/quintela.git migration-next-20120921

for you to fetch changes up to 4bce0b88b10ed790ad3669ce4ff61c945cd655eb:

  cpus: create qemu_cpu_is_vcpu() (2012-09-21 10:43:10 +0200)


Juan Quintela (40):
  buffered_file: g_realloc() can't fail
  fix migration sync
  migration: store end_time in a local variable
  migration: print total downtime for final phase of migration
  migration: rename expected_time to expected_downtime
  migration: export migrate_get_current()
  migration: print expected downtime in info migrate
  savevm: Factorize ram globals reset in its own function
  ram: introduce migration_bitmap_set_dirty()
  ram: Introduce migration_bitmap_test_and_reset_dirty()
  ram: Export last_ram_offset()
  ram: introduce migration_bitmap_sync()
  ram: create trace event for migration sync bitmap
  Separate migration bitmap
  migration: Add dirty_pages_rate to query migrate output
  buffered_file: rename opaque to migration_state
  buffered_file: opaque is MigrationState
  buffered_file: unfold migrate_fd_put_buffer
  buffered_file: unfold migrate_fd_put_ready
  buffered_file: unfold migrate_fd_put_buffer
  buffered_file: unfold migrate_fd_put_buffer
  buffered_file: We can access directly to bandwidth_limit
  buffered_file: callers of buffered_flush() already check for errors
  buffered_file: make buffered_flush return the error code
  migration: make migrate_fd_wait_for_unfreeze() return errors
  savevm: unexport qemu_fflush
  virtio-net: use qemu_get_buffer() in a temp buffer
  savevm: Remove qemu_fseek()
  savevm: make qemu_fflush() return an error code
  savevm: unfold qemu_fclose_internal()
  savevm: unexport qemu_ftell()
  savevm: make qemu_fill_buffer() be consistent
  savevm: Only qemu_fflush() can generate errors
  buffered_file: buffered_put_buffer() don't need to set last_error
  block-migration: make flush_blks() return errors
  block-migration:  Switch meaning of return value
  block-migration: handle errors with the return codes correctly
  savevm: un-export qemu_file_set_error()
  savevm: make qemu_file_put_notify() return errors
  cpus: create qemu_cpu_is_vcpu()

Paolo Bonzini (1):
  BufferedFile: append, then flush

 arch_init.c       | 141 +++++++++++++++++++++++++++++++++++++++++-------------
 block-migration.c |  51 ++++++++++----------
 buffered_file.c   | 128 +++++++++++++++++--------------------------------
 buffered_file.h   |  12 +----
 cpu-all.h         |   3 +-
 cpus.c            |   9 +++-
 exec-obsolete.h   |  10 ----
 exec.c            |   2 +-
 hmp.c             |  12 +++++
 hw/virtio-net.c   |   4 +-
 migration.c       |  46 +++++++++---------
 migration.h       |  10 ++++
 qapi-schema.json  |  20 ++++++--
 qemu-file.h       |   8 +---
 qmp-commands.hx   |   9 ++++
 savevm.c          | 117 +++++++++++++++++---------------------------
 trace-events      |   4 ++
 17 files changed, 316 insertions(+), 270 deletions(-)

-- 
1.7.11.4

^ permalink raw reply	[flat|nested] 95+ messages in thread
* [Qemu-devel] [PATCH v2 00/41]  Migration cleanups, refactorings, stats, and more
@ 2012-10-02 11:32 Juan Quintela
  2012-10-02 11:33 ` [Qemu-devel] [PATCH 05/41] migration: rename expected_time to expected_downtime Juan Quintela
  0 siblings, 1 reply; 95+ messages in thread
From: Juan Quintela @ 2012-10-02 11:32 UTC (permalink / raw)
  To: qemu-devel

Hi

v2: (20121001)
- fix qemu_in_vcpu_thread: marcelo
- fix "fix migration sync on setup"
- addressed all marcelo comments

Please, review.


v1: (20120921)

This is the mergable part of migration thread work that I am doing.
What it does:
- cleanups left and right
- 2nd patch is a (fix migration sync) should be applied to stable IMHO
   Othrewise, we "could" be sending zero pages 2 times.
- It introduces the stats discused previously
   * expected_downtime
   * downtime
   * dirty_pages_rate
     All Eric & Luiz comments have been addressed
- buffered file has been basically unfolded.  It was used only once,
  with one user.  So we de-abstracted it.
  Notice that with migration patches, it makes no sense anymore
- migration bitmap

  Now the bitmap is 1bit per page.  Notice that this only affects to
  migration.  For the rest (aka TCG & VGA), we still use the old bitmap.

- remove qemu_file* functions that were not used or used only once
- last_error: we have made that almost all error paths return one error
  instead of zero, so we use much, much less the error on the qemu_file.
  Some of the last remmants are:
  * still there due to callbacks (can be removed when the thread is
    integrated)
  * are on the read path (I haven't touched a lot of those yet)
- qemu_cpu_is_vcpu()

  We used to test if we were _not_ an vcpu testing if we were the
  iothread.  With the migration thread that is not true anymore.  So
  create a function that does the right thing.

Please review.

Thanks, Juan.

The following changes since commit e744c06fca438dc08271e626034e632a270c91c8:

  fpu/softfloat.c: Return correctly signed values from uint64_to_float32 (2012-10-01 22:06:39 +0200)

are available in the git repository at:

  http://repo.or.cz/r/qemu/quintela.git migration-next-20121001

for you to fetch changes up to 7708df6346690e7b93d6c162d6e97f0428559bd5:

  cpus: create qemu_in_vcpu_thread() (2012-10-02 13:13:47 +0200)


Juan Quintela (40):
  buffered_file: g_realloc() can't fail
  fix migration sync
  migration: store end_time in a local variable
  migration: print total downtime for final phase of migration
  migration: rename expected_time to expected_downtime
  migration: export migrate_get_current()
  migration: print expected downtime in info migrate
  savevm: Factorize ram globals reset in its own function
  ram: introduce migration_bitmap_set_dirty()
  ram: Introduce migration_bitmap_test_and_reset_dirty()
  ram: Export last_ram_offset()
  ram: introduce migration_bitmap_sync()
  ram: create trace event for migration sync bitmap
  Separate migration bitmap
  migration: Add dirty_pages_rate to query migrate output
  buffered_file: rename opaque to migration_state
  buffered_file: opaque is MigrationState
  buffered_file: unfold migrate_fd_put_buffer
  buffered_file: unfold migrate_fd_put_ready
  buffered_file: unfold migrate_fd_wait_for_unfreeze
  buffered_file: unfold migrate_fd_close
  buffered_file: We can access directly to bandwidth_limit
  buffered_file: callers of buffered_flush() already check for errors
  buffered_file: make buffered_flush return the error code
  migration: make migrate_fd_wait_for_unfreeze() return errors
  savevm: unexport qemu_fflush
  virtio-net: use qemu_get_buffer() in a temp buffer
  savevm: Remove qemu_fseek()
  savevm: make qemu_fflush() return an error code
  savevm: unfold qemu_fclose_internal()
  savevm: unexport qemu_ftell()
  savevm: make qemu_fill_buffer() be consistent
  savevm: Only qemu_fflush() can generate errors
  buffered_file: buffered_put_buffer() don't need to set last_error
  block-migration: make flush_blks() return errors
  block-migration:  Switch meaning of return value
  block-migration: handle errors with the return codes correctly
  savevm: un-export qemu_file_set_error()
  savevm: make qemu_file_put_notify() return errors
  cpus: create qemu_in_vcpu_thread()

Paolo Bonzini (1):
  BufferedFile: append, then flush

 arch_init.c       | 141 +++++++++++++++++++++++++++++++++++++++++-------------
 block-migration.c |  56 +++++++++++-----------
 buffered_file.c   | 129 ++++++++++++++++++-------------------------------
 buffered_file.h   |  12 +----
 cpu-all.h         |   3 +-
 cpus.c            |   9 +++-
 exec-obsolete.h   |  10 ----
 exec.c            |   2 +-
 hmp.c             |  12 +++++
 hw/virtio-net.c   |   4 +-
 migration.c       |  46 +++++++++---------
 migration.h       |  10 ++++
 qapi-schema.json  |  20 ++++++--
 qemu-file.h       |   8 +---
 qmp-commands.hx   |   9 ++++
 savevm.c          | 117 +++++++++++++++++---------------------------
 trace-events      |   4 ++
 17 files changed, 320 insertions(+), 272 deletions(-)

-- 
1.7.11.4

^ permalink raw reply	[flat|nested] 95+ messages in thread

end of thread, other threads:[~2012-10-02 11:33 UTC | newest]

Thread overview: 95+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21  8:46 [Qemu-devel] [PATCH 00/41] Migration cleanups, refactorings, stats, and more Juan Quintela
2012-09-21  8:46 ` [Qemu-devel] [PATCH 01/41] buffered_file: g_realloc() can't fail Juan Quintela
2012-09-21 12:11   ` Paolo Bonzini
2012-09-25  8:08   ` Orit Wasserman
2012-09-21  8:46 ` [Qemu-devel] [PATCH 02/41] fix migration sync Juan Quintela
2012-09-21 12:17   ` Paolo Bonzini
2012-09-25  8:45     ` Paolo Bonzini
2012-10-02 10:43       ` Juan Quintela
2012-10-02 10:53         ` Paolo Bonzini
2012-09-21  8:46 ` [Qemu-devel] [PATCH 03/41] migration: store end_time in a local variable Juan Quintela
2012-09-21 12:17   ` Paolo Bonzini
2012-09-25  8:10   ` Orit Wasserman
2012-09-21  8:46 ` [Qemu-devel] [PATCH 04/41] migration: print total downtime for final phase of migration Juan Quintela
2012-09-21 12:19   ` Paolo Bonzini
2012-09-25  8:18   ` Orit Wasserman
2012-09-21  8:46 ` [Qemu-devel] [PATCH 05/41] migration: rename expected_time to expected_downtime Juan Quintela
2012-09-21 12:19   ` Paolo Bonzini
2012-09-25  8:21   ` Orit Wasserman
2012-09-21  8:47 ` [Qemu-devel] [PATCH 06/41] migration: export migrate_get_current() Juan Quintela
2012-09-21  8:47 ` [Qemu-devel] [PATCH 07/41] migration: print expected downtime in info migrate Juan Quintela
2012-09-21 12:22   ` Paolo Bonzini
2012-10-02 10:47     ` Juan Quintela
2012-09-21  8:47 ` [Qemu-devel] [PATCH 08/41] savevm: Factorize ram globals reset in its own function Juan Quintela
2012-09-25  8:37   ` Orit Wasserman
2012-09-21  8:47 ` [Qemu-devel] [PATCH 09/41] ram: introduce migration_bitmap_set_dirty() Juan Quintela
2012-09-25  8:38   ` Orit Wasserman
2012-09-21  8:47 ` [Qemu-devel] [PATCH 10/41] ram: Introduce migration_bitmap_test_and_reset_dirty() Juan Quintela
2012-09-25  9:35   ` Orit Wasserman
2012-09-21  8:47 ` [Qemu-devel] [PATCH 11/41] ram: Export last_ram_offset() Juan Quintela
2012-09-21  8:47 ` [Qemu-devel] [PATCH 12/41] ram: introduce migration_bitmap_sync() Juan Quintela
2012-09-21  8:47 ` [Qemu-devel] [PATCH 13/41] ram: create trace event for migration sync bitmap Juan Quintela
2012-09-21  8:47 ` [Qemu-devel] [PATCH 14/41] Separate migration bitmap Juan Quintela
2012-09-21  8:47 ` [Qemu-devel] [PATCH 15/41] migration: Add dirty_pages_rate to query migrate output Juan Quintela
2012-09-21 12:33   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 16/41] BufferedFile: append, then flush Juan Quintela
2012-09-21  8:47 ` [Qemu-devel] [PATCH 17/41] buffered_file: rename opaque to migration_state Juan Quintela
2012-09-25 11:41   ` Orit Wasserman
2012-10-02 10:54     ` Juan Quintela
2012-09-21  8:47 ` [Qemu-devel] [PATCH 18/41] buffered_file: opaque is MigrationState Juan Quintela
2012-09-25 11:46   ` Orit Wasserman
2012-09-28  7:33     ` Juan Quintela
2012-09-28  7:48       ` Orit Wasserman
2012-09-21  8:47 ` [Qemu-devel] [PATCH 19/41] buffered_file: unfold migrate_fd_put_buffer Juan Quintela
2012-09-21  8:47 ` [Qemu-devel] [PATCH 20/41] buffered_file: unfold migrate_fd_put_ready Juan Quintela
2012-09-21  8:47 ` [Qemu-devel] [PATCH 21/41] buffered_file: unfold migrate_fd_put_buffer Juan Quintela
2012-09-21 12:34   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 22/41] " Juan Quintela
2012-09-21 12:35   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 23/41] buffered_file: We can access directly to bandwidth_limit Juan Quintela
2012-09-21 12:35   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 24/41] buffered_file: callers of buffered_flush() already check for errors Juan Quintela
2012-09-21 12:39   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 25/41] buffered_file: make buffered_flush return the error code Juan Quintela
2012-09-21 12:43   ` Paolo Bonzini
2012-10-02 11:06     ` Juan Quintela
2012-10-02 11:16       ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 26/41] migration: make migrate_fd_wait_for_unfreeze() return errors Juan Quintela
2012-09-21 12:44   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 27/41] savevm: unexport qemu_fflush Juan Quintela
2012-09-21 12:45   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 28/41] virtio-net: use qemu_get_buffer() in a temp buffer Juan Quintela
2012-09-21 12:45   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 29/41] savevm: Remove qemu_fseek() Juan Quintela
2012-09-21 12:46   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 30/41] savevm: make qemu_fflush() return an error code Juan Quintela
2012-09-21 12:46   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 31/41] savevm: unfold qemu_fclose_internal() Juan Quintela
2012-09-21 12:48   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 32/41] savevm: unexport qemu_ftell() Juan Quintela
2012-09-21 12:48   ` Paolo Bonzini
2012-09-21 15:42     ` Juan Quintela
2012-09-21  8:47 ` [Qemu-devel] [PATCH 33/41] savevm: make qemu_fill_buffer() be consistent Juan Quintela
2012-09-21 12:48   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 34/41] savevm: Only qemu_fflush() can generate errors Juan Quintela
2012-09-21 12:49   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 35/41] buffered_file: buffered_put_buffer() don't need to set last_error Juan Quintela
2012-09-21 12:50   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 36/41] block-migration: make flush_blks() return errors Juan Quintela
2012-09-21 12:50   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 37/41] block-migration: Switch meaning of return value Juan Quintela
2012-09-21 12:51   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 38/41] block-migration: handle errors with the return codes correctly Juan Quintela
2012-09-21 12:53   ` Paolo Bonzini
2012-09-24 18:24     ` Juan Quintela
2012-09-25  6:36       ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 39/41] savevm: un-export qemu_file_set_error() Juan Quintela
2012-09-21 12:53   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 40/41] savevm: make qemu_file_put_notify() return errors Juan Quintela
2012-09-21 12:53   ` Paolo Bonzini
2012-09-21  8:47 ` [Qemu-devel] [PATCH 41/41] cpus: create qemu_cpu_is_vcpu() Juan Quintela
2012-09-21 12:54   ` Paolo Bonzini
2012-09-21 14:48     ` Andreas Färber
2012-09-21 15:36       ` Paolo Bonzini
2012-09-24 18:11     ` Juan Quintela
  -- strict thread matches above, loose matches on Subject: below --
2012-10-02 11:32 [Qemu-devel] [PATCH v2 00/41] Migration cleanups, refactorings, stats, and more Juan Quintela
2012-10-02 11:33 ` [Qemu-devel] [PATCH 05/41] migration: rename expected_time to expected_downtime Juan Quintela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).