qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] ed1f3e: Migration: Generate the completed eve


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] ed1f3e: Migration: Generate the completed event only when ...
Date: Fri, 16 Oct 2015 08:30:03 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: ed1f3e0090069dcb9458aa9e450df12bf8eba0b0
      
https://github.com/qemu/qemu/commit/ed1f3e0090069dcb9458aa9e450df12bf8eba0b0
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2015-10-15 (Thu, 15 Oct 2015)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  Migration: Generate the completed event only when we complete

The current migration-completed event is generated a bit too early,
which means that an eager libvirt that's ready to go as soon
as it sees the event ends up racing with the actual end of migration.

This corresponds to RH bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1271145

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
xSigned-off-by: Juan Quintela <address@hidden>


  Commit: 92e3762237475407fe03e1ccac6e30612ab96caf
      
https://github.com/qemu/qemu/commit/92e3762237475407fe03e1ccac6e30612ab96caf
  Author: Amit Shah <address@hidden>
  Date:   2015-10-15 (Thu, 15 Oct 2015)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: announce VM's new home just before VM is runnable

We were announcing the dest host's IP as our new IP a bit too soon -- if
there were errors detected after this announcement was done, the
migration is failed and the VM could continue running on the src host --
causing problems later.

Move around the qemu_announce_self() call so it's done just before the
VM is runnable.

Signed-off-by: Amit Shah <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 60be6340796e66b5ac8aac2d98dde5c79336a89c
      
https://github.com/qemu/qemu/commit/60be6340796e66b5ac8aac2d98dde5c79336a89c
  Author: Denis V. Lunev <address@hidden>
  Date:   2015-10-15 (Thu, 15 Oct 2015)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: fix deadlock

Release qemu global mutex before call synchronize_rcu().
synchronize_rcu() waiting for all readers to finish their critical
sections. There is at least one critical section in which we try
to get QGM (critical section is in address_space_rw() and
prepare_mmio_access() is trying to aquire QGM).

Both functions (migration_end() and migration_bitmap_extend())
are called from main thread which is holding QGM.

Thus there is a race condition that ends up with deadlock:
main thread     working thread
Lock QGA                |
|             Call KVM_EXIT_IO handler
|                       |
|        Open rcu reader's critical section
Migration cleanup bh    |
|                       |
synchronize_rcu() is    |
waiting for readers     |
|            prepare_mmio_access() is waiting for QGM
  \                   /
   deadlock

The patch changes bitmap freeing from direct g_free after synchronize_rcu
to free inside call_rcu.

Signed-off-by: Denis V. Lunev <address@hidden>
Reported-by: Igor Redko <address@hidden>
Tested-by: Igor Redko <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>

CC: Anna Melekhova <address@hidden>
CC: Juan Quintela <address@hidden>
CC: Amit Shah <address@hidden>
CC: Paolo Bonzini <address@hidden>
CC: Wen Congyang <address@hidden>


  Commit: e95bdb4341c36ee158ff9dda4ade3f94405c69ce
      
https://github.com/qemu/qemu/commit/e95bdb4341c36ee158ff9dda4ade3f94405c69ce
  Author: Peter Maydell <address@hidden>
  Date:   2015-10-16 (Fri, 16 Oct 2015)

  Changed paths:
    M migration/migration.c
    M migration/ram.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20151015' 
into staging

migration/next for 20151015

# gpg: Signature made Thu 15 Oct 2015 07:25:27 BST using RSA key ID 5872D723
# gpg: Good signature from "Juan Quintela <address@hidden>"
# gpg:                 aka "Juan Quintela <address@hidden>"

* remotes/juanquintela/tags/migration/20151015:
  migration: fix deadlock
  migration: announce VM's new home just before VM is runnable
  Migration: Generate the completed event only when we complete

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


Compare: https://github.com/qemu/qemu/compare/c49d3411faae...e95bdb4341c3

reply via email to

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