qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Live migration without bdrv_drain_all()
@ 2016-08-29 15:06 Stefan Hajnoczi
  2016-08-29 18:56 ` Felipe Franciosi
  2016-09-27  9:48 ` Daniel P. Berrange
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2016-08-29 15:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: cui, felipe, Kevin Wolf, Paolo Bonzini

At KVM Forum an interesting idea was proposed to avoid
bdrv_drain_all() during live migration.  Mike Cui and Felipe Franciosi
mentioned running at queue depth 1.  It needs more thought to make it
workable but I want to capture it here for discussion and to archive
it.

bdrv_drain_all() is synchronous and can cause VM downtime if I/O
requests hang.  We should find a better way of quiescing I/O that is
not synchronous.  Up until now I thought we should simply add a
timeout to bdrv_drain_all() so it can at least fail (and live
migration would fail) if I/O is stuck instead of hanging the VM.  But
the following approach is also interesting...

During the iteration phase of live migration we could limit the queue
depth so points with no I/O requests in-flight are identified.  At
these points the migration algorithm has the opportunity to move to
the next phase without requiring bdrv_drain_all() since no requests
are pending.

Unprocessed requests are left in the virtio-blk/virtio-scsi virtqueues
so that the destination QEMU can process them after migration
completes.

Unfortunately this approach makes convergence harder because the VM
might also be dirtying memory pages during the iteration phase.  Now
we need to reach a spot where no I/O is in-flight *and* dirty memory
is under the threshold.

Thoughts?

Stefan

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

end of thread, other threads:[~2016-10-12 13:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-29 15:06 [Qemu-devel] Live migration without bdrv_drain_all() Stefan Hajnoczi
2016-08-29 18:56 ` Felipe Franciosi
2016-09-27  9:27   ` Stefan Hajnoczi
2016-09-27  9:51     ` Daniel P. Berrange
2016-09-27  9:54     ` Dr. David Alan Gilbert
2016-09-28  9:03       ` Juan Quintela
2016-09-28 10:00         ` Felipe Franciosi
2016-09-28 10:23         ` Daniel P. Berrange
2016-09-27  9:48 ` Daniel P. Berrange
2016-10-12 13:09   ` Stefan Hajnoczi

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).