Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-7350

[qemu-kvm] RFE: Make bdrv_inactivate_all() asynchronous

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Medium
    • rhel-virt-storage
    • ssg_virtualization
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:

      brdv_inactivate_all() is a synchronous function.
      When we call it on migration, we have to "potentially" wait a lot of time for it to finish, it depends on how much dirty state there are for the block devices.
      But in migration we still have to send the last pages of RAM (i.e. by default 300ms, but with some downloads we allow a downtime of 1second). We actually do:
      (see migration/savevm.c:qemu_savevm_state_complete_precopy()

      stop_vm()
      for each dirty page
      send_dirty_page()
      bdrv_inactivate_all()

      And what we would like to do is something like:

      stop_vm()
      bdrv_inactivate_all_start_async()
      for each dirty page
      send_dirty_page()
      brdv_inactivate_all_wait_for_completion()

      We can discuss if we want to add a timeout parameter to this last function. Or to be able to "undo" the bdrv_inactivate_start_async().

      Why?

      Because we know that we have a "downtime" limit for the completion stage. Current code just finish the migration, don't matter how long it takes. But what we really want is to detect if it is taking too long, and it that case, return to the iterative stage of migration.

              eblake_redhat Eric Blake
              quintela Juan Quintela (Inactive)
              Eric Blake Eric Blake
              Aihua Liang Aihua Liang
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: