qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 5da5aa: migration: simplify while loop


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 5da5aa: migration: simplify while loop
Date: Mon, 11 Mar 2013 08:00:20 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 5da5aad068def65b5e278a6380192d4bfe279585
      
https://github.com/qemu/qemu/commit/5da5aad068def65b5e278a6380192d4bfe279585
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: simplify while loop

Unify the goto around the loop, with the exit condition at the end of it.
Both can be expressed as "while (ret >= 0)".

Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 891518abd804401978e402d588733e282be960ad
      
https://github.com/qemu/qemu/commit/891518abd804401978e402d588733e282be960ad
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: always use vm_stop_force_state

vm_stop_force_state does:

    if (runstate_is_running()) {
  vm_stop(state);
    } else {
  runstate_set(state);
    }

migration.c does:

    if (runstate_is_running()) {
  vm_stop(state);
    } else {
  vm_stop_force_state(state);
    }

The code run is the same even if we always use vm_stop_force_state in
migration.c.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 7a2c17216cd5ae4c22844123b8e9360d517932f8
      
https://github.com/qemu/qemu/commit/7a2c17216cd5ae4c22844123b8e9360d517932f8
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: move more error handling to migrate_fd_cleanup

The next patch will add more cases where qemu_savevm_state_cancel
needs to be called; prepare for that already, the function can be
called twice with no ill effect.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 04943ebaa9e4f5f9ac080198a7b0d25c6d7ac444
      
https://github.com/qemu/qemu/commit/04943ebaa9e4f5f9ac080198a7b0d25c6d7ac444
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M savevm.c

  Log Message:
  -----------
  migration: push qemu_savevm_state_cancel out of qemu_savevm_state_*

This is useful, because it lets us keep the cancellation callbacks
inside the big lock while pushing the others out.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: d418cf57a3e699746ef0bfa772bbe8c7e17cebb5
      
https://github.com/qemu/qemu/commit/d418cf57a3e699746ef0bfa772bbe8c7e17cebb5
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M block-migration.c

  Log Message:
  -----------
  block-migration: remove useless calls to blk_mig_cleanup

Now that the cancel callback is called consistently for all errors,
we can avoid doing its work in the other callbacks.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 93bf21044c38134bc7d35577b675d9f2bdcb8419
      
https://github.com/qemu/qemu/commit/93bf21044c38134bc7d35577b675d9f2bdcb8419
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M savevm.c

  Log Message:
  -----------
  qemu-file: pass errno from qemu_fflush via f->last_error

This is done by almost all callers of qemu_fflush, move the code
directly to qemu_fflush.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 47c8c17af883b5bd0f147cfcec8d7ef8ff76023b
      
https://github.com/qemu/qemu/commit/47c8c17af883b5bd0f147cfcec8d7ef8ff76023b
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/sysemu/sysemu.h
    M savevm.c

  Log Message:
  -----------
  migration: use qemu_file_set_error to pass error codes back to 
qemu_savevm_state

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 4eb938102b3d533e142de23e255e46da1326fc5a
      
https://github.com/qemu/qemu/commit/4eb938102b3d533e142de23e255e46da1326fc5a
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/migration/qemu-file.h
    M savevm.c

  Log Message:
  -----------
  qemu-file: temporarily expose qemu_file_set_error and qemu_fflush

Right now, migration cannot entirely rely on QEMUFile's automatic
drop of I/O after an error, because it does its "real" I/O outside
the put_buffer callback.  To fix this until buffering is gone, expose
qemu_file_set_error which we will use in buffered_flush.

Similarly, buffered_flush is not a complete flush because some data may
still reside in the QEMUFile's own buffer.  This somewhat complicates the
process of closing the migration thread.  Again, when buffering is gone
buffered_flush will disappear and calling qemu_fflush will not be needed;
in the meanwhile, we expose the function for use in migration.c.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: f5821518ed6d49aae9fd0aa6169d2d74bb83054c
      
https://github.com/qemu/qemu/commit/f5821518ed6d49aae9fd0aa6169d2d74bb83054c
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: flush all data to fd when buffered_flush is called

Including data that resided in the QEMUFile's own buffer.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 63dfbd7ee03185c181a0791958ec9c8337089b55
      
https://github.com/qemu/qemu/commit/63dfbd7ee03185c181a0791958ec9c8337089b55
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: use qemu_file_set_error

Remove the return value of buffered_flush, pass it via the error code
of s->file.  Once this is done, the error can be retrieved simply
via migrate_fd_close's call to qemu_fclose.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: dba433c03a0f5dc22a459435dd89557886298921
      
https://github.com/qemu/qemu/commit/dba433c03a0f5dc22a459435dd89557886298921
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/migration/migration.h
    M migration.c

  Log Message:
  -----------
  migration: simplify error handling

Always use qemu_file_get_error to detect errors, since that is how
QEMUFile itself drops I/O after an error occurs.  There is no need
to propagate and check return values all the time.

Also remove the "complete" member, since we know that it is set (via
migrate_fd_cleanup) only when the state changes.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: a3fa1d78cbae2259491b17689812edcb643a3b30
      
https://github.com/qemu/qemu/commit/a3fa1d78cbae2259491b17689812edcb643a3b30
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: do not nest flushing of device data

Completion of migration is currently done with a "nested" loop that
invokes buffered_flush: migrate_fd_completed is called by
buffered_file_thread, which calls migrate_fd_cleanup, which calls
buffered_close (via qemu_fclose), which flushes the buffer.

Simplify this, by reusing the buffered_flush call of buffered_file_thread.
Then if qemu_savevm_state_complete was called, and the buffer is empty
(including the QEMUFile buffer, for which we need the previous patch), we
are done.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: c09e5bb1d88ef38986bac7c6ed59dbd732cc4771
      
https://github.com/qemu/qemu/commit/c09e5bb1d88ef38986bac7c6ed59dbd732cc4771
  Author: Kazuya Saito <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c
    M trace-events

  Log Message:
  -----------
  migration: add migrate_set_state tracepoint

Signed-off-by: Kazuya Saito <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: f4410a5d9926886c36d9fa9fdd969d0469d62724
      
https://github.com/qemu/qemu/commit/f4410a5d9926886c36d9fa9fdd969d0469d62724
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: prepare to access s->state outside critical sections

Accessing s->state outside the big QEMU lock will simplify a bit the
locking/unlocking of the iothread lock.

We need to keep the lock in migrate_fd_error and migrate_fd_completed,
however, because they call migrate_fd_cleanup.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: bb1fadc444ff967554c41d96cb9dde110e8aece9
      
https://github.com/qemu/qemu/commit/bb1fadc444ff967554c41d96cb9dde110e8aece9
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/migration/migration.h
    M migration.c

  Log Message:
  -----------
  migration: cleanup migration (including thread) in the iothread

Perform final cleanup in a bottom half, and add joining the thread to
the series of cleanup actions.

migrate_fd_error remains for connection error, but it doesn't need
to cleanup anything anymore.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: a55ce1c851b5802569fb00b2a645a73c03fd7c86
      
https://github.com/qemu/qemu/commit/a55ce1c851b5802569fb00b2a645a73c03fd7c86
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M block-migration.c

  Log Message:
  -----------
  block-migration: remove variables that are never read

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 13197e3cbaba0ba693dd2855a32182ca584fa97e
      
https://github.com/qemu/qemu/commit/13197e3cbaba0ba693dd2855a32182ca584fa97e
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M block-migration.c

  Log Message:
  -----------
  block-migration: small preparatory changes for locking

Some small changes that will simplify the positioning of lock/unlock
primitives.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 323920c4eac01de74cf2b5e941c97ca9b2d36b7f
      
https://github.com/qemu/qemu/commit/323920c4eac01de74cf2b5e941c97ca9b2d36b7f
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M block-migration.c

  Log Message:
  -----------
  block-migration: document usage of state across threads

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 52e850dea988585c3d693fd9cd4a4c38968d89b8
      
https://github.com/qemu/qemu/commit/52e850dea988585c3d693fd9cd4a4c38968d89b8
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M block-migration.c
    M include/qemu/atomic.h

  Log Message:
  -----------
  block-migration: add lock

Some state is shared between the block migration code and its AIO
callbacks.  Once block migration will run outside the iothread,
the block migration code and the AIO callbacks will be able to
run concurrently.  Protect the critical sections with a separate
lock.  Do the same for completed_sectors, which can be used from
the monitor.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 8c8de19d93444536d3291e6ab83e2bcf61dd2d0c
      
https://github.com/qemu/qemu/commit/8c8de19d93444536d3291e6ab83e2bcf61dd2d0c
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/migration/vmstate.h

  Log Message:
  -----------
  migration: reorder SaveVMHandlers members

This groups together the callbacks that later will have similar
locking rules.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 32c835ba3984728c22d4e73cdb595090a60f437e
      
https://github.com/qemu/qemu/commit/32c835ba3984728c22d4e73cdb595090a60f437e
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M arch_init.c
    M block-migration.c
    M include/migration/vmstate.h
    M migration.c

  Log Message:
  -----------
  migration: run pending/iterate callbacks out of big lock

This makes it possible to do blocking writes directly to the socket,
with no buffer in the middle.  For RAM, only the migration_bitmap_sync()
call needs the iothread lock.  For block migration, it is needed by
the block layer (including bdrv_drain_all and dirty bitmap access),
but because some code is shared between iterate and complete, all of
mig_save_device_dirty is run with the lock taken.

In the savevm case, the iterate callback runs within the big lock.
This is annoying because it complicates the rules.  Luckily we do not
need to do anything about it: the RAM iterate callback does not need
the iothread lock, and block migration never runs during savevm.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 9b0950375277467fd74a9075624477ae43b9bb22
      
https://github.com/qemu/qemu/commit/9b0950375277467fd74a9075624477ae43b9bb22
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M arch_init.c
    M block-migration.c
    M include/migration/vmstate.h
    M migration.c
    M savevm.c

  Log Message:
  -----------
  migration: run setup callbacks out of big lock

Only the migration_bitmap_sync() call needs the iothread lock.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: edaae611f6df0d66a8b5a90c84123b72980c7a22
      
https://github.com/qemu/qemu/commit/edaae611f6df0d66a8b5a90c84123b72980c7a22
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/migration/migration.h
    M migration.c
    M savevm.c

  Log Message:
  -----------
  migration: yay, buffering is gone

Buffering was needed because blocking writes could take a long time
and starve other threads seeking to grab the big QEMU mutex.

Now that all writes (except within _complete callbacks) are done
outside the big QEMU mutex, we do not need buffering at all.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 5f496a1be3d15f192be1ab1fed3a3278fd5a91a1
      
https://github.com/qemu/qemu/commit/5f496a1be3d15f192be1ab1fed3a3278fd5a91a1
  Author: Juan Quintela <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  Rename buffered_ to migration_

This is consistent once that we have moved everything to migration.c

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 05f28b837c6bd6124abab2496ce15c07a334a5ad
      
https://github.com/qemu/qemu/commit/05f28b837c6bd6124abab2496ce15c07a334a5ad
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/migration/qemu-file.h
    M savevm.c

  Log Message:
  -----------
  qemu-file: make qemu_fflush and qemu_file_set_error private again

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 059f896cefb2776181e39d9ba69345bd9d07d52b
      
https://github.com/qemu/qemu/commit/059f896cefb2776181e39d9ba69345bd9d07d52b
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: eliminate last_round

We will go around the loop exactly once after setting last_round.
Eliminate the variable altogether.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: fd45ee2c643bb3d55de5c54b50c23859ca631a9f
      
https://github.com/qemu/qemu/commit/fd45ee2c643bb3d55de5c54b50c23859ca631a9f
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: detect error before sleeping

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: db2f25309af1af0f27e0ddec4acc3b66837fa668
      
https://github.com/qemu/qemu/commit/db2f25309af1af0f27e0ddec4acc3b66837fa668
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: remove useless qemu_file_get_error check

migration_put_buffer is never called if there has been an error.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: a0ff044b8ea81908cd8fe5819ce33780f53f58ee
      
https://github.com/qemu/qemu/commit/a0ff044b8ea81908cd8fe5819ce33780f53f58ee
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: use qemu_file_rate_limit consistently

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 817b9ed5eb300dbb434d752da416441028539a96
      
https://github.com/qemu/qemu/commit/817b9ed5eb300dbb434d752da416441028539a96
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/migration/qemu-file.h
    M migration-exec.c
    M savevm.c

  Log Message:
  -----------
  migration: merge qemu_popen_cmd with qemu_popen

There is no reason for outgoing exec migration to do popen manually
anymore (the reason used to be that we needed the FILE* to make it
non-blocking).  Use qemu_popen_cmd.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: ce39ee3184a02eca7f9529cc19b1582f6f704c70
      
https://github.com/qemu/qemu/commit/ce39ee3184a02eca7f9529cc19b1582f6f704c70
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M savevm.c

  Log Message:
  -----------
  qemu-file: fsync a writable stdio QEMUFile

This is what fd_close does.  Prepare for switching to a QEMUFile.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 13c7b2da073ec83cb47f9582149c8d28bb038e73
      
https://github.com/qemu/qemu/commit/13c7b2da073ec83cb47f9582149c8d28bb038e73
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/qemu/osdep.h
    M migration-exec.c
    M savevm.c

  Log Message:
  -----------
  qemu-file: check exit status when closing a pipe QEMUFile

This is what exec_close does.  Move this to the underlying QEMUFile.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 0cc3f3ccc9d29acc94b995430518bda1c7c01bef
      
https://github.com/qemu/qemu/commit/0cc3f3ccc9d29acc94b995430518bda1c7c01bef
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/migration/qemu-file.h
    M migration-tcp.c
    M migration-unix.c
    M savevm.c

  Log Message:
  -----------
  qemu-file: add writable socket QEMUFile

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 3f2d38faab97f4d676c41868a8243997b2aab7cb
      
https://github.com/qemu/qemu/commit/3f2d38faab97f4d676c41868a8243997b2aab7cb
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M savevm.c

  Log Message:
  -----------
  qemu-file: simplify and export qemu_ftell

Force a flush when qemu_ftell is called.  This simplifies the buffer magic
(it also breaks qemu_ftell for input QEMUFiles, but we never use it).

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: f8bbc1286337a8506162b5785babe6f2a7de2476
      
https://github.com/qemu/qemu/commit/f8bbc1286337a8506162b5785babe6f2a7de2476
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/migration/migration.h
    M migration-exec.c
    M migration-fd.c
    M migration-tcp.c
    M migration-unix.c
    M migration.c
    M savevm.c

  Log Message:
  -----------
  migration: use QEMUFile for migration channel lifetime

As a start, use QEMUFile to store the destination and close it.
qemu_get_fd gets a file descriptor that will be used by the write
callbacks.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: e6a1cf21328802f3a83e84e893b8cb8a468141cc
      
https://github.com/qemu/qemu/commit/e6a1cf21328802f3a83e84e893b8cb8a468141cc
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/migration/migration.h
    M migration-exec.c
    M migration-fd.c
    M migration-tcp.c
    M migration-unix.c
    M migration.c

  Log Message:
  -----------
  migration: use QEMUFile for writing outgoing migration data

Second, drop the file descriptor indirection, and write directly to the
QEMUFile.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: be7172e22a9c3bc448894e57f6c2d1af6ffd47fd
      
https://github.com/qemu/qemu/commit/be7172e22a9c3bc448894e57f6c2d1af6ffd47fd
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: use qemu_ftell to compute bandwidth

Prepare for when s->bytes_xfer will be removed.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 442773cef15092b5927851237850760345d2cf16
      
https://github.com/qemu/qemu/commit/442773cef15092b5927851237850760345d2cf16
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: small changes around rate-limiting

This patch extracts a few small changes from the next patch, which
are unrelated to adding generic rate-limiting functionality to
QEMUFile.  Make migration_set_rate_limit a simple accessor, and
use qemu_file_set_rate_limit consistently.  Also fix a typo where
INT_MAX should have been SIZE_MAX.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 1964a397063967acc5ce71a2a24ed26e74824ee1
      
https://github.com/qemu/qemu/commit/1964a397063967acc5ce71a2a24ed26e74824ee1
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M docs/migration.txt
    M include/migration/qemu-file.h
    M migration.c
    M savevm.c

  Log Message:
  -----------
  migration: move rate limiting to QEMUFile

Rate limiting is now simply a byte counter; client call
qemu_file_rate_limit() manually to determine if they have to exit.
So it is possible and simple to move the functionality to QEMUFile.

This makes the remaining functionality of s->file redundant;
in the next patch we can remove it and write directly to s->migration_file.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 404a7c05bcc20c51fe1a9bf2deaeb4d6b658d3a3
      
https://github.com/qemu/qemu/commit/404a7c05bcc20c51fe1a9bf2deaeb4d6b658d3a3
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: move contents of migration_close to migrate_fd_cleanup

With this patch, the migration_file is not needed anymore.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: b352365f5abec075dede0222f1bc37674d64117c
      
https://github.com/qemu/qemu/commit/b352365f5abec075dede0222f1bc37674d64117c
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M include/migration/migration.h
    M migration-exec.c
    M migration-fd.c
    M migration-tcp.c
    M migration-unix.c
    M migration.c

  Log Message:
  -----------
  migration: eliminate s->migration_file

The indirection is useless now.  Backends can open s->file directly.

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 6f190a0641f5b06a462b62955c15c77b8fb3990c
      
https://github.com/qemu/qemu/commit/6f190a0641f5b06a462b62955c15c77b8fb3990c
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: inline migrate_fd_close

Reviewed-by: Orit Wasserman <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 0db65d624e0211a43c011579d6607a50d8f06082
      
https://github.com/qemu/qemu/commit/0db65d624e0211a43c011579d6607a50d8f06082
  Author: Orit Wasserman <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M page_cache.c

  Log Message:
  -----------
  Fix page_cache leak in cache_resize

Signed-off-by: Orit Wasserman <address@hidden>

Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: a0ee2031dbf5f0183412d4b20a30cbfd404616a8
      
https://github.com/qemu/qemu/commit/a0ee2031dbf5f0183412d4b20a30cbfd404616a8
  Author: Orit Wasserman <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M page_cache.c

  Log Message:
  -----------
  Fix cache_resize to keep old entry age

Instead of using cache_insert do the update itself

Signed-off-by: Orit Wasserman <address@hidden>

Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 32a1c08b60a8ac0e63b54a5793a26b5e32b36618
      
https://github.com/qemu/qemu/commit/32a1c08b60a8ac0e63b54a5793a26b5e32b36618
  Author: Peter Lieven <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M page_cache.c

  Log Message:
  -----------
  page_cache: fix memory leak

XBZRLE encoded migration introduced a MRU page cache
meachnism. Unfortunately, cached items where never freed in
case of a collision in the page cache on cache_insert().

This lead to out of memory conditions during XBZRLE migration
if the page cache was small and there where a lot of collisions
in the cache.

Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Orit Wasserman <address@hidden>

Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: ee0b44aa9d9450e873a761ca2030b2fa3ec52eb0
      
https://github.com/qemu/qemu/commit/ee0b44aa9d9450e873a761ca2030b2fa3ec52eb0
  Author: Peter Lieven <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M arch_init.c
    M include/migration/page_cache.h
    M page_cache.c

  Log Message:
  -----------
  page_cache: dup memory on insert

The page cache frees all data on finish, on resize and
if there is collision on insert. So it should be the caches
responsibility to dup the data that is stored in the cache.

Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Orit Wasserman <address@hidden>

Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: fe3cc14fd83e0c8f376d849ccd0fc3433388442d
      
https://github.com/qemu/qemu/commit/fe3cc14fd83e0c8f376d849ccd0fc3433388442d
  Author: Anthony Liguori <address@hidden>
  Date:   2013-03-11 (Mon, 11 Mar 2013)

  Changed paths:
    M arch_init.c
    M block-migration.c
    M docs/migration.txt
    M include/migration/migration.h
    M include/migration/page_cache.h
    M include/migration/qemu-file.h
    M include/migration/vmstate.h
    M include/qemu/atomic.h
    M include/qemu/osdep.h
    M include/sysemu/sysemu.h
    M migration-exec.c
    M migration-fd.c
    M migration-tcp.c
    M migration-unix.c
    M migration.c
    M page_cache.c
    M savevm.c
    M trace-events

  Log Message:
  -----------
  Merge remote-tracking branch 'quintela/migration.next' into staging

# By Paolo Bonzini (40) and others
# Via Juan Quintela
* quintela/migration.next: (46 commits)
  page_cache: dup memory on insert
  page_cache: fix memory leak
  Fix cache_resize to keep old entry age
  Fix page_cache leak in cache_resize
  migration: inline migrate_fd_close
  migration: eliminate s->migration_file
  migration: move contents of migration_close to migrate_fd_cleanup
  migration: move rate limiting to QEMUFile
  migration: small changes around rate-limiting
  migration: use qemu_ftell to compute bandwidth
  migration: use QEMUFile for writing outgoing migration data
  migration: use QEMUFile for migration channel lifetime
  qemu-file: simplify and export qemu_ftell
  qemu-file: add writable socket QEMUFile
  qemu-file: check exit status when closing a pipe QEMUFile
  qemu-file: fsync a writable stdio QEMUFile
  migration: merge qemu_popen_cmd with qemu_popen
  migration: use qemu_file_rate_limit consistently
  migration: remove useless qemu_file_get_error check
  migration: detect error before sleeping
  ...


Compare: https://github.com/qemu/qemu/compare/bba18e23f726...fe3cc14fd83e

reply via email to

[Prev in Thread] Current Thread [Next in Thread]