1. 19 7月, 2013 1 次提交
  2. 11 3月, 2013 7 次提交
  3. 13 2月, 2013 1 次提交
    • S
      block-migration: fix pending() and iterate() return values · 6aaa9dae
      Stefan Hajnoczi 提交于
      The return value of .save_live_pending() is the number of bytes
      remaining.  This is just an estimate because we do not know how many
      blocks will be dirtied by the running guest.
      
      Currently our return value for .save_live_pending() is wrong because it
      includes dirty blocks but not in-flight bdrv_aio_readv() requests or
      unsent blocks.  Crucially, it also doesn't include the bulk phase where
      the entire device is transferred - therefore we risk completing block
      migration before all blocks have been transferred!
      
      The return value of .save_live_iterate() is the number of bytes
      transferred this iteration.  Currently we return whether there are bytes
      remaining, which is incorrect.
      
      Move the bytes remaining calculation into .save_live_pending() and
      really return the number of bytes transferred this iteration in
      .save_live_iterate().
      
      Also fix the %ld format specifier which was used for a uint64_t
      argument.  PRIu64 must be use to avoid warnings on 32-bit hosts.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Message-id: 1360661835-28663-3-git-send-email-stefanha@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6aaa9dae
  4. 11 2月, 2013 3 次提交
  5. 26 1月, 2013 2 次提交
  6. 21 12月, 2012 1 次提交
    • J
      savevm: New save live migration method: pending · e4ed1541
      Juan Quintela 提交于
      Code just now does (simplified for clarity)
      
          if (qemu_savevm_state_iterate(s->file) == 1) {
             vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
             qemu_savevm_state_complete(s->file);
          }
      
      Problem here is that qemu_savevm_state_iterate() returns 1 when it
      knows that remaining memory to sent takes less than max downtime.
      
      But this means that we could end spending 2x max_downtime, one
      downtime in qemu_savevm_iterate, and the other in
      qemu_savevm_state_complete.
      
      Changed code to:
      
          pending_size = qemu_savevm_state_pending(s->file, max_size);
          DPRINTF("pending size %lu max %lu\n", pending_size, max_size);
          if (pending_size >= max_size) {
              ret = qemu_savevm_state_iterate(s->file);
           } else {
              vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
              qemu_savevm_state_complete(s->file);
           }
      
      So what we do is: at current network speed, we calculate the maximum
      number of bytes we can sent: max_size.
      
      Then we ask every save_live section how much they have pending.  If
      they are less than max_size, we move to complete phase, otherwise we
      do an iterate one.
      
      This makes things much simpler, because now individual sections don't
      have to caluclate the bandwidth (it was implossible to do right from
      there).
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      e4ed1541
  7. 19 12月, 2012 4 次提交
  8. 18 10月, 2012 3 次提交
  9. 28 9月, 2012 1 次提交
  10. 20 7月, 2012 5 次提交
  11. 29 6月, 2012 1 次提交
  12. 15 3月, 2012 1 次提交
  13. 14 1月, 2012 1 次提交
  14. 15 12月, 2011 1 次提交
    • P
      block: bdrv_aio_* do not return NULL · ad54ae80
      Paolo Bonzini 提交于
      Initially done with the following semantic patch:
      
      @ rule1 @
      expression E;
      statement S;
      @@
        E =
      (
         bdrv_aio_readv
      |  bdrv_aio_writev
      |  bdrv_aio_flush
      |  bdrv_aio_discard
      |  bdrv_aio_ioctl
      )
           (...);
      (
      - if (E == NULL) { ... }
      |
      - if (E)
          { <... S ...> }
      )
      
      which however missed the occurrence in block/blkverify.c
      (as it should have done), and left behind some unused
      variables.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ad54ae80
  15. 05 12月, 2011 1 次提交
  16. 17 11月, 2011 1 次提交
  17. 20 10月, 2011 4 次提交
  18. 21 8月, 2011 1 次提交
  19. 24 6月, 2011 1 次提交